arr-movement-bridge

A small Elixir project (no dependencies) for the definition on the GTM glossary page What Is Annual Recurring Revenue (ARR)?, read on 28 Nov 2026.

The page says ARR is the yearly value of active subscription contracts, counting only repeatable revenue and excluding one-time fees such as setup or services; that ARR is often MRR multiplied by 12; that plans are built backward from ARR targets as new ARR from new customers, expansion ARR from upsells and lost ARR from churn and downgrades; and that a company should define whether trials, usage fees and discounts count. Its worked example: 40 customers at $2,000 a month plus 10 at $5,000 a month is $130,000 MRR and $1,560,000 ARR, and a one-time $10,000 onboarding fee adds to revenue that quarter but not to ARR. This tool does those three things from CSV files.

What it does

mix arr FILE reads billing lines (customer,kind,monthly_amount, with kind one of recurring, one_time, usage, trial, discount) and prints MRR, ARR (MRR x 12) and the one-time fees that are revenue but not ARR. --usage, --trials and --discounts net|ignore let you state your own definition. The defaults (usage and trials left out, discounts subtracted) are this tool's choice; the page only says to define them.

mix arr.bridge OPENING.csv CLOSING.csv turns two snapshots into an ARR bridge: opening ARR, plus new, plus expansion, minus downgrade, minus churn, equals closing ARR, with a check that the bridge balances. A customer with no ARR in the opening snapshot is new, with ARR in the opening and none in the closing is churn, and a change in between is expansion or downgrade. Money is held in integer cents so sums are exact. The CSV reader is a plain comma split: no quoted commas.

mix arr examples/q1.csv
mix arr examples/q1.csv --usage --discounts ignore
mix arr.bridge examples/q1.csv examples/q2.csv

Test

mix test
sh examples/run.sh

The tests rebuild the page's example (40 x $2,000 and 10 x $5,000 gives $1,560,000 ARR), check that a one-time fee never enters ARR, the usage, trial and discount options, and a bridge that splits new, expansion, downgrade and churn and balances. Every customer and amount in examples/ is made up. MIT licensed.