calculate_metric
Compute business, SaaS, and finance metrics with exact decimal precision. Specify the metric and its parameters to receive structured results.
Instructions
Compute a business / SaaS / finance metric with exact decimal precision.
Supported metric values -> params keys (rates/margins are decimals,
0.05 = 5%):
ltv -> arpu, churn_rate, [gross_margin=1]
cac -> total_spend, new_customers
ltv_cac_ratio -> ltv, cac
payback_period_months-> cac, monthly_revenue_per_customer, [gross_margin=1]
contribution_margin -> revenue, variable_costs
gross_margin -> revenue, cogs
churn_rate -> customers_lost, customers_at_start
mrr_growth_rate -> beginning_mrr, ending_mrr
arr -> mrr
break_even_units -> fixed_costs, price_per_unit, variable_cost_per_unit
nrr -> starting_mrr, expansion_mrr, contraction_mrr, churned_mrr
grr -> starting_mrr, contraction_mrr, churned_mrr
rule_of_40 -> growth_rate, profit_margin
magic_number -> current_quarter_revenue, prior_quarter_revenue, prior_quarter_sm_spend
Call list_metrics for full schemas.
Args: metric: Name of the metric to compute. params: Object of named numeric parameters for the chosen metric. currency: ISO currency code used to format monetary results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metric | Yes | ||
| params | Yes | ||
| currency | No | USD |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||