> For the complete documentation index, see [llms.txt](https://gitbook-docs.coinmetrics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook-docs.coinmetrics.io/data-visualization/charting-tool/formula-builder.md).

# Formula Builder

https\://charts.coinmetrics.io/formulas/

### Formula Builder Overview

The formula builder allows you to transform the available Coin Metrics' data series. For example, you can create your own ratios, add together USDT metrics, slice or splice time series, even customize the line colors and many more things.

The formula builder editor and information can be found via the menu in the top left by clicking on the CM logo and selecting the "Formulas" button.

<figure><img src="https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-be3c78fddc4e1b51ef215c708e305eb10d7190b8%2FScreenshot%202024-07-02%20at%207.46.19%E2%80%AFPM.png?alt=media" alt="" width="132"><figcaption></figcaption></figure>

If you are unfamiliar with the formula builder and syntax, the "Help" tab is a good place to start.

<figure><img src="https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-f794567b7570bdc90f745e2a0cce3b8b322d9c7a%2FScreenshot%202024-07-02%20at%207.47.27%E2%80%AFPM.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

### Formula Editor

The formula editor is under the "Formulas" tab. An example of a very simple formula is shown below.

<figure><img src="https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-b06af168e82a920b8677dd1e30cefec40ad5abff%2FScreenshot%202024-07-02%20at%207.48.40%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>

### Syntax

Specific **syntax** and **syntax** **examples** can be found on the "Syntax" tab. You can search for the specific "formula" in the "Search..." window or scroll through the list of available formulas. Once a formula is selected, further information on that formula (including the "syntax" and often an example) show up in the window.

<figure><img src="https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-2971af4c43ba91d95726b9c10452e1f80e5acc15%2FScreenshot%202024-07-02%20at%207.49.41%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-4ebba66863f8646ae483ea8c246d65bec61a4fb3%2FScreenshot%202024-07-02%20at%207.49.20%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>

### Chart/Formula Example

A great example of a Formula Builder Chart is this *BTC Market Cap Dominance* chart. This chart can be built easily in our Formula Builder.

![BTC Dominance (Free Float Market Cap)](https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-5bbf6145fdc2953d462f96e4a0a131771cb8b075%2FScreen%20Shot%202021-08-06%20at%202.14.19%20PM.png?alt=media)

If you click into the Formula Editor on the right side of the [charts](https://charts.coinmetrics.io/formulas/#1394), you can see the syntax used to create a combined time-series of Market Cap across all of the assets supported in our universe.

![BTC Dominance (Formula Editor Syntax)](https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-1cb78be0518c377bcb75e40e90c2c51859eb990e%2FScreen%20Shot%202021-08-06%20at%202.14.54%20PM.png?alt=media)

This just scratches the surface, as there are many other ways you can use this tool to transform our time-series. Here are a few more examples:

* [ETH HODL Waves](https://charts.coinmetrics.io/formulas/#297)
* [BTC Active Supply Bands](https://charts.coinmetrics.io/formulas/#212)
* [USDT\_ETH Supply Distribution](https://charts.coinmetrics.io/formulas/#212)
* [USDT\_ETH Address Distribution](https://charts.coinmetrics.io/formulas/#163)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook-docs.coinmetrics.io/data-visualization/charting-tool/formula-builder.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
