# Formula

A computed metric that calculates values from other metrics and channel data


A computed metric that calculates its value automatically from other metrics and channel data. Formula values are not entered manually — they update in real time based on the clipping's data.

## Writing a formula

Type `@` in the formula editor to insert references:

- **Metrics** — reference other custom metrics ([Number](/help/clippings/custom-metrics/number), [Slider](/help/clippings/custom-metrics/slider), [Dropdown](/help/clippings/custom-metrics/dropdown), or other Formula metrics). For dropdowns, the arithmetic value is used in calculations.
- **Channel fields** — reference built-in channel data such as Media Value, Views, Likes, Reach, or Print Run. Only fields available across all channels assigned to the formula metric are shown.
- **Functions** — use built-in math functions for rounding, absolute values, and more.

## Available operators

| Operator | Description        |
| -------- | ------------------ |
| `+`      | Addition           |
| `-`      | Subtraction        |
| `*`      | Multiplication     |
| `/`      | Division           |
| `%`      | Modulo (remainder) |
| `^`      | Exponentiation     |
| `( )`    | Grouping           |

## Available functions

| Function    | Description               | Example                      |
| ----------- | ------------------------- | ---------------------------- |
| `round()`   | Round to nearest integer  | `round(3.7)` → `4`           |
| `roundTo()` | Round to N decimal places | `roundTo(3.756, 2)` → `3.76` |
| `floor()`   | Round down                | `floor(3.7)` → `3`           |
| `ceil()`    | Round up                  | `ceil(3.2)` → `4`            |
| `abs()`     | Absolute value            | `abs(-5)` → `5`              |
| `sqrt()`    | Square root               | `sqrt(16)` → `4`             |
| `min()`     | Smaller of two values     | `min(3, 7)` → `3`            |
| `max()`     | Larger of two values      | `max(3, 7)` → `7`            |

## Example formulas

- `@Media Value * 2` — double the media value
- `round(@Views / 1000)` — views in thousands, rounded
- `(@Sentiment Score + @Visibility Score) / 2` — average of two metrics
- `roundTo(@Media Value / @Print Run, 2)` — cost per copy, rounded to 2 decimals

## Using dropdown metrics in formulas

When a formula references a [Dropdown metric](/help/clippings/custom-metrics/dropdown), the dropdown's **numeric value** is used in the calculation — not the option text. Each dropdown option can have a custom numeric value assigned via the **Numeric values** toggle in the dropdown configuration.

For example, if a "Sentiment" dropdown has options Positive (value: 1), Neutral (value: 0), and Negative (value: -1), a formula like `@Sentiment * @Media Value` will multiply the media value by the sentiment weight.

## Channel compatibility

A formula metric's referenced fields must be available for **all channels** the formula is assigned to. For example, if your formula uses Views and is assigned to both YouTube and Print, it will show an error because Print does not have a Views field. Either narrow the formula's channels or use only fields that all assigned channels share (such as Media Value).

