Soft Launch 🚀 Get notified when we officially launch.

Docs
Functions Reference

Functions Reference

All available formulas, operators, and keywords by category.

Arithmetic

-
arithmetic

Subtracts the right value from the left value.

Syntax

a - b

Arguments

  • a
    Minuend
  • b
    Subtrahend
Standard minus sign
-
arithmetic

Flips the sign of a value, turning a positive number into a negative one (or vice versa) for each time period.

Syntax

-a

Arguments

  • a
    Value to negate
Negates a value (e.g. -100)
*
arithmetic

Multiplies two values.

Syntax

a * b

Arguments

  • a
    Multiplicand
  • b
    Multiplier
Asterisk (Shift + 8)
/
arithmetic

Divides the left value by the right value.

Syntax

a / b

Arguments

  • a
    Dividend
  • b
    Divisor
Forward slash
^
arithmetic

Raises the left value to the power of the right value.

Syntax

a ^ b

Arguments

  • a
    The base number
  • b
    The exponent
Caret (Shift + 6)
+
arithmetic

Adds two values.

Syntax

a + b

Arguments

  • a
    Left operand
  • b
    Right operand
Standard plus sign
+
arithmetic

It does nothing, just a structural identify operation, leaves the value unchanged.

Syntax

+a

Arguments

  • a
    Value
Standard plus sign
abs
arithmetic

Finds the absolute value of a series for each time period.

Syntax

abs(Series)

Arguments

  • Series
    The series you want to find the absolute value of.
prod
arithmetic

Multiplies provided series together for each time period.

Syntax

prod(Serie 1, Serie 2 ...)

Arguments

  • SeriesOptional
    The series you want to multiply.
prod_series
arithmetic

Calculates the product of all values across your timeline. You can filter the series with period markers using functions like is('Historical').

Syntax

prod_series(Series, Filter, Placement)

Arguments

  • Series
    The series of values you want to multiply.
  • FilterOptional
    An optional boolean condition. The engine will only multiply the periods where this is true. E.g., if you use is('Historical') here, the engine will only calculate the product of the series where the period markers contain 'Historical'. If you leave this blank, the engine will evaluate the series across your entire timeline.
  • PlacementOptional
    Tells the engine exactly where to drop the result on your timeline. You can pin it using conditions like is_last('Historical'). If you leave this blank, the result will be placed in the very first period.
round
arithmetic

Rounds a series to a specific number of decimal places for each time period.

Syntax

round(Series, Places)

Arguments

  • Series
    The series you want to round.
  • PlacesOptional
    The number of decimal places to round to. Default is 0.
sqrt
arithmetic

Calculates the square root of a series for each time period.

Syntax

sqrt(Series)

Arguments

  • Series
    The series you want to find the square root of.
sum
arithmetic

Calculates the sum of multiple series for each time period.

Syntax

sum(Serie 1, Serie 2 ...)

Arguments

  • SeriesOptional
    The series you want to sum.
sum_series
arithmetic

Sums all the values across your timeline. You can filter the series with period markers using functions like is('Historical').

Syntax

sum_series(Series, Filter, Placement)

Arguments

  • Series
    The series you want to sum.
  • FilterOptional
    An optional boolean condition. The engine will only sum the periods where this is true. E.g., if you use is('Historical') here, the engine will only sum the series where the period markers contain 'Historical'. If you leave this blank, the engine will evaluate the series across your entire timeline.
  • PlacementOptional
    Tells the engine exactly where to drop the result on your timeline. You can pin it using conditions like is_last('Historical'). If you leave this blank, the result will be placed in the very first period.

Comparison

!=
comparison

Stands for 'Not Equal'. Check if two values are different. Type ! then =.

Syntax

a != b

Arguments

  • a
    Left value
  • b
    Right value
Type "!" then "="
<
comparison

Check if the left value is less than the right value.

Syntax

a < b

Arguments

  • a
    Value to check
  • b
    Threshold
<=
comparison

Check if the left value is less than or equal to the right value.

Syntax

a <= b

Arguments

  • a
    Value to check
  • b
    Threshold
Type "<" then "="
==
comparison

Stands for 'Equal'. Check if two values are equal. Type = twice (no space between them).

Syntax

a == b

Arguments

  • a
    Left value
  • b
    Right value
Type "=" twice (no spaces)
>
comparison

Check if the left value is greater than the right value.

Syntax

a > b

Arguments

  • a
    Value to check
  • b
    Threshold
>=
comparison

Check if the left value is greater than or equal to the right value.

Syntax

a >= b

Arguments

  • a
    Value to check
  • b
    Threshold
Type ">" then "="

Date

days
date

Returns the exact number of days within the current time period. Accounts for varying month lengths and leap years.

Syntax

days()
month
date

Returns month (1-12) of the current time period, or the month of a provided date.

Syntax

month(date)

Arguments

  • dateOptional
    Optional date series.
quarter
date

Returns the quarter (1-4) of the current time period, or the quarter of a provided date.

Syntax

quarter(date)

Arguments

  • dateOptional
    Optional date series.
year
date

Returns the year of the current time period, or the year of a provided date.

Syntax

year(date)

Arguments

  • dateOptional
    Optional date series.
year_frac
date

Returns the fraction of a full year that the current time period represents. For example, a single month will return approximately 0.083.

Syntax

year_frac()

Financial

cagr
financial

Calculates the Compound Annual Growth Rate (CAGR) of a series over your timeline. Automatically accounts for exact days between the first and last valid periods.

Syntax

cagr(Series, Filter, Placement)

Arguments

  • Series
    The series you want to evaluate.
  • FilterOptional
    An optional boolean condition. E.g., if you use is('Historical') here, the engine will only calculate CAGR across the historical periods.
  • PlacementOptional
    Tells the engine exactly where to drop the result on your timeline. If you leave this blank, the result will be placed in the very first period.
xirr
financial

Calculates the annualized internal rate of return across your timeline. Automatically handles exact period dates and accounts for leap years.

Syntax

xirr(Values, Filter, Valuation Period)

Arguments

  • Values
    The cash flow series you want to calculate the IRR for.
  • FilterOptional
    An optional condition to include only specific periods. The engine will only calculate using periods where this is true. E.g., if you use is('Forecast') here, it will calculate IRR using only the cash flows within the Forecast phase. If you leave this blank, it evaluates the entire timeline.
  • Valuation PeriodOptional
    Tells the engine exactly where to drop the result on your timeline. You can pin it using conditions like is_last('Historical'). If you leave this blank, the result will be placed in the very first period. Unlike xnpv, where you place this result does not affect the calculated IRR, because the underlying math cancels out!
xnpv
financial

Calculates the net present value of a cash flow series across your timeline. It automatically handles exact period dates and accounts for leap years.

Syntax

xnpv(Rate, Values, Filter, Timing, Valuation Period)

Arguments

  • Rate
    The annualized discount rate to apply. Just like Excel, the engine applies this rate correctly regardless of your timeline's frequency (e.g., monthly vs. annual).
  • Values
    The cash flow series you want to discount.
  • FilterOptional
    An optional condition to include only specific periods. The engine will only calculate using periods where this is true. E.g., if you use is('Forecast') here, it will calculate NPV using only the cash flows within the Forecast phase. If you leave this blank, it evaluates the entire timeline.
  • TimingOptional
    Defines when cash flows happen within each period: 'start', 'mid' (middle of the period), or 'end'. If you leave this blank, cash flows are assumed to hit at the end of the period.
  • Valuation PeriodOptional
    Defines Time Zero for your valuation. The engine will discount all cash flows back to this specific period. You can pin it using conditions like is_last('Historical'). If left blank, it defaults to discounting back to the very first period on your timeline.

Keyword

@blank
keyword

Represents an empty or missing value. Useful for clearing data or conditional checks.

Syntax

@blank
Type @ at the beginning to bring up the autocompletion.
@self
keyword

References the current variable itself. Useful in functions like prev().

Syntax

@self
Type @ at the beginning to bring up the autocompletion.

Lifecycle

convolve
lifecycle

Performs a discrete convolution of an inflow series with a distribution curve.

Syntax

convolve(Inflow, Curve, Filter)

Arguments

  • Inflow
    The sequence of new inputs for each period.
  • Curve
    The curve applied to each inflow. It represents age or duration, not calandar dates.
  • FilterOptional
    An optional mask to pause the new inflows.
depreciate
lifecycle

Calculates how your capital investments lose value over time. It takes your capital expenditures (CapEx) and spreads the costs out across their useful lifespan, you can choose between Straight Line (SL) or Double Declining Balance (DDB) methods.

Syntax

depreciate(CapEx, Useful Life, Method, Salvage, Filter)

Arguments

  • CapEx
    The amount of money spent on new capital assets in each period. You can also enter negative numbers to represent selling or disposing of assets.
  • Useful Life
    How long the asset is expected to last, measured in periods. It tracks each investment separately. If you enter a $10k CapEx in month one with a 5-period life, and a $20k CapEx in month two with a 10-period life, it remembers both groups and depreciates them on their own independent schedules.
  • MethodOptional
    How you want to calculate the drop in value. Choose SL for Straight Line or DDB for Double Declining Balance (faster drop early on). If you leave this blank, it defaults to SL.
  • SalvageOptional
    The estimated resale value of the asset at the end of its useful life. The depreciation will stop at this amount. This is absolute dollar amount, not percentage. Defaults to 0.
  • FilterOptional
    An optional switch to ignore new investments. If this is 0 (false) for a given period, any CapEx entered right then is ignored. However, your older assets will continue to depreciate normally.
runoff
lifecycle

Runs off an existing baseline or historical balance over time. This is the perfect companion to the cohort function: use runoff to decay your existing mature portfolio from the moment your actuals end, and use cohort to track all new additions from that point forward.

Syntax

runoff(Balances, Retention, Anchor)

Arguments

  • Balances
    The series containing your existing balances (e.g., your historical active users).
  • Retention
    The retention curve over time. This represents cohort age, not calendar dates. The first value represents the start of the runoff, the second value is the retention rate one period after the start of the runoff, and so on. Retention curve always starts from your very first time period, regardless of when your runoff starts.
  • Anchor
    Tells the engine where the runoff should start. For example, passing is_last('Historical') ensures the runoff anchors exactly to the final historical period.
survival
lifecycle

Converts a churn curve into a cumulative retention curve. You can input negative churn rates, this is useful if you are modeling Net Revenue Retention.

Syntax

survival(Harzard Curve)

Arguments

  • Harzard Curve
    The churn curve over time. This represents cohort age, not calendar dates. The value at period 1 is the churn rate for age 1, period 2 for age 2, etc.

Logical

!
logical

Stands for 'Not'. It flips a condition's state, turning true into false and false into true. It is very handy for excluding things, like using !is('Historical') will exclude all historical periods.

Syntax

!a

Arguments

  • a
    Condition to invert
Type "!"
&&
logical

Stands for 'And'. It combines two conditions and return true only if both are met. For example, you can check things like if a period is('Historical') && Revenue > 0

Syntax

condition a && condition b

Arguments

  • condition a
    Left condition
  • condition b
    Right condition
Type "&" twice
||
logical

Stands for 'or'. It combines two conditions and return true if any one of them is met.

Syntax

condition a || condition b

Arguments

  • condition a
    Left condition
  • condition b
    Right condition
Type "|" twice (Shift + \)
if
logical

Evaluates a logical condition, return one result if the condition is true, and another if it's false.

Syntax

if(Condition, Value if True, Value if False)

Arguments

  • Condition
    The logical test you want to evaluate.
  • Value if True
    The result to return when the condition is met.
  • Value if FalseOptional
    The result to return when the condition fails.
iferror
logical

Evaluates a formula and catches any errors (like division by zero). If an error occurs, the Value if Error branch you defined will be used.

Syntax

iferror(Value, Value if Error)

Arguments

  • Value
    The primary expression you want to evaluate.
  • Value if Error
    The fallback value or expression if the primary expression results an error.
ifs
logical

Evaluates a sequence of conditions, returns the result when the first condition is met. This function can be used as an alternative to nesting multiple 'if' functions.

Syntax

ifs(Condition 1, Value if True 1, Condition 2, Value if True 2 ...)

Arguments

  • Condition and Value Pairs
    Alternating conditions and their corresponding results (e.g., condition 2, result 1, condition 2, result 2).

Lookup

is
lookup

Checks if a period belongs to a specific marker (like 'Historical' or 'Forecast'). It returns a 1 (true) in periods that match, and a 0 (false) where they don't, making it perfect for turning calculations on or off. You can easily combine these using standard operators like `!` (not), `&&` (and), and `||` (or) to build fully dynamic models. For example, `!is('Historical')` or `is('Lease-up') && is('Operational')`.

Syntax

is(Marker)

Arguments

  • Marker
    The name of the marker you want to check for (e.g., 'Historical').
is_first
lookup

Finds the very first period of your timeline, or the first period of a specific marker. It returns a 1 (true) in that exact period and a 0 (false) everywhere else.

Syntax

is_first(Marker)

Arguments

  • MarkerOptional
    Optional. The name of the marker to search within. If you leave this blank, it finds the very first period of your entire timeline.
is_last
lookup

Finds the very last period of your timeline, or the last period of a specific marker. It returns a 1 (true) in that exact period and a 0 (false) everywhere else.

Syntax

is_last(Marker)

Arguments

  • MarkerOptional
    Optional. The name of the marker to search within. If you leave this blank, it finds the very last period of your entire timeline.
lookup
lookup

Grabs a specific value from a series based on a condition you set, and make it available to the entire timeline and downstream calculations.

Syntax

lookup(Series, Condition, Search Direction)

Arguments

  • Series
    The series containing the value you want to extract.
  • Condition
    The condition that tells the engine where to look. You can use period markers such as is('Historical') or you can use conditions like Revenue > 0.
  • Search DirectionOptional
    If your condition matches multiple periods, this tells the engine whether to grab the value from the 'start' (first match) or 'end' (last match) of that range. Defaults to 'start'.

Macro

children
macro

It automatically grabs all the line items grouped directly under the current one. Wrap it inside functions like sum() or avg() to create dynamic roll-ups. For example, setting 'Total Operating Expenses' to sum(children()) will always add up its sub-accounts, even if you add or remove items later.

Syntax

children()
E.g., sum(children()) will dynamically sum all chidlren of this variable.

Statistical

avg
statistical

Calculates the average across multiple series for each time period.

Syntax

avg(Serie 1, Serie 2 ...)

Arguments

  • SeriesOptional
    The series you want to average.
avg_series
statistical

Calculates the average value across your timeline. You can filter the series with period markers using functions like is('Historical').

Syntax

avg_series(Series, Filter, Placement)

Arguments

  • Series
    The series you want to average.
  • FilterOptional
    An optional boolean condition. The engine will only average the periods where this is true. E.g., if you use is('Historical') here, the engine will only average the series where the period markers contain 'Historical'. If you leave this blank, the engine will evaluate the series across your entire timeline.
  • PlacementOptional
    Tells the engine exactly where to drop the result on your timeline. You can pin it using conditions like is_last('Historical'). If you leave this blank, the result will be placed in the very first period.
max
statistical

Finds the highest value among the provided series for each time period.

Syntax

max(Serie 1, Serie 2 ...)

Arguments

  • SeriesOptional
    The series you want to compare.
max_series
statistical

Finds the maximum value across your timeline. You can filter the series with period markers using functions like is('Historical').

Syntax

max_series(Series, Filter, Placement)

Arguments

  • Series
    The series you want to find the maximum value of.
  • FilterOptional
    An optional boolean condition. The engine will only look at the periods where this is true. E.g., if you use is('Historical') here, the engine will only find the max of the series where the period markers contain 'Historical'. If you leave this blank, the engine will evaluate the series across your entire timeline.
  • PlacementOptional
    Tells the engine exactly where to drop the result on your timeline. You can pin it using conditions like is_last('Historical'). If you leave this blank, the result will be placed in the very first period.
min
statistical

Finds the lowest value among provided series for each time period.

Syntax

min(Serie 1, Serie 2 ...)

Arguments

  • SeriesOptional
    The series you want to compare.
min_series
statistical

Finds the minimum value across your timeline. You can filter the series with period markers using functions like is('Historical').

Syntax

min_series(Series, Filter, Placement)

Arguments

  • Series
    The series you want to find the minimum value of.
  • FilterOptional
    An optional boolean condition. The engine will only look at the periods where this is true. E.g., if you use is('Historical') here, the engine will only find the min of the series where the period markers contain 'Historical'. If you leave this blank, the engine will evaluate the series across your entire timeline.
  • PlacementOptional
    Tells the engine exactly where to drop the result on your timeline. You can pin it using conditions like is_last('Historical'). If you leave this blank, the result will be placed in the very first period.
roll
statistical

Calculates a rolling aggregation over a trailing window of periods. For example, use it to calculate a trailing twelve month (TTM) sum or a rolling 3-month average.

Syntax

roll(Series, Window, Method)

Arguments

  • Series
    The series you want to evaluate.
  • Window
    The number of trailing periods to include in the rolling window.
  • MethodOptional
    The type of calculation: 'avg', 'sum', 'min', 'max', or 'prod'. If you leave this blank, it defaults to 'avg'.
wtavg
statistical

Calculates the weighted average for each time period using alternating Value and Weight pairs.

Syntax

wtavg(Value and Weight Pair 1, Value and Weight Pair 2 ...)

Arguments

  • Value and Weight PairsOptional
    Alternating arguments: Value 1, Weight 1, Value 2, Weight 2...
wtavg_series
statistical

Calculates the weighted average of a series across your timeline.

Syntax

wtavg_series(Values, Weights, Filter, Placement)

Arguments

  • Values
    The series of values you want to average.
  • Weights
    The series containing the weights for each period.
  • FilterOptional
    An optional boolean condition to filter which periods to include.
  • PlacementOptional
    Tells the engine exactly where to drop the result on your timeline.

Timeshift

next
timeshift

Grabs a value from a future period for each time period.

Syntax

next(Series, Periods, Final Value)

Arguments

  • Series
    The series you want to look ahead at.
  • PeriodsOptional
    How many periods into the future you want to look. For example, enter 1 for the next period. Defaults to 1 if left blank.
  • Final ValueOptional
    The final value to use if there is no next period. If you leave this blank, it defaults to 0.
prev
timeshift

Grabs a value from a past period for each time period. This is useful for calculating period-over-period growth or carrying over an ending balance to the current period's starting balance.

Syntax

prev(Series, Periods, Initial Value)

Arguments

  • Series
    The series you want to look back at.
  • PeriodsOptional
    How many periods back you want to look. For example, enter 1 to get the previous period's value. Defaults to 1 if left blank.
  • Initial ValueOptional
    The initial value to use if there is no previous period. You can pass in another variable as the initial value. If you leave this blank, the default is 0.