Applicable plans

- Free
- Plus
- Business
- Enterprise

Formulas are a powerful way to work with and discover new information about your data. We're constantly expanding Zenkit's formula abilities, so check back here for updates.

For now, formulas let you work with functions and normal numeric operators.

To learn how to use formulas in your collections, please read the guide to formulas and aggregations.

## Numeric Operators

Numeric operators can use numbers from number fields, or references.

Operator | Description | Example |

+ | Add together two numbers. Uses number and reference fields. | {Material Cost} + {Tool Cost} |

- | Subtract two values. | Price - 5.50 |

* | Multiply two values together. | Time * {Cost per hour} |

/ | Divide two values | {Lifetime Value} / {Number of Invoices} |

## Numeric Functions

Numeric functions can use numbers, number fields and, in some cases, references in the formula.

Function | Description | Example |

sqrt(number) | Square root. Accepts one value as parameter and returns it's square root. | sqrt(4) |

abs(number) | Absolute. Accepts one value and returns its absolute value. | abs(-4) = 4 |

min(numer, number2) | Minimum. Accepts one or more parameters or a reference, and returns the minimum of the given values. | min(3,1) = 1 |

max(number, number2) | Maximum. Accepts one or more parameters or a reference, and returns the maximum of the given values. | max(3,1) = 3 |

exp or E(power) | Exponent. Calculates e to the given power. | E(1) = 2.72 |

pow | Power. | pow(2,3) = 8 |

avg({reference collection: number field}) | Average. Accepts a reference as a parameter and returns the average of all values. | avg({Astronauts:Wage}) |