Calculate · Assess & Decide · Analysis & Finance
Net revenue retention with leaky-bucket flag
A correct NRR computation (net of expansion) with a leaky-bucket verdict and a benchmark comparison.
You receive: A reviewed NRR calculator + the passing test report, run on your numbers.
Part of Choose Business Model
Opens soon
Cost20 credits
AcceptanceAutomated check against your inputs
ProtectionHeld until verified delivery
This objective is verified and ready. It opens soon, once sign-in and payments are live.
Deliverable interface
The exact vocabulary the automated check enforces: keys, tokens, entry points, and worked examples. Generated from the verification source.
{
"constants": {
"_NRR_BENCH": {
"b2b-saas-best-in-class-120": 120,
"b2b-saas-good-110": 110,
"plg-median-100": 100
}
},
"entryName": "compute_net_revenue_retention",
"expectNote": "expect is the comparison-space value (your return value goes through normalize first when one is published)",
"hiddenCaseCount": 8,
"hiddenCaseNames": [
"boundary_exactly_100",
"above_100_below_benchmark",
"custom_benchmark",
"fractional_rounding",
"all_churn",
"expansion_only",
"invalid_zero_base",
"invalid_negative_base"
],
"inputKeys": [
"benchmark_band",
"churned_mrr",
"contraction_mrr",
"custom_benchmark_pct",
"expansion_mrr",
"starting_mrr"
],
"normalizeSource": "def _nrr_normalize(r):\n \"\"\"Coerce the operator's result (top-level nrr_pct/leaky_bucket/benchmark_verdict)\n to the canonical comparable; the invalid sentinel passes through; else repr (fails).\"\"\"\n if isinstance(r, str):\n return r\n try:\n return {\n \"nrr_pct\": round(float(r[\"nrr_pct\"]), 1),\n \"leaky_bucket\": bool(r[\"leaky_bucket\"]),\n \"benchmark_verdict\": str(r[\"benchmark_verdict\"]),\n }\n except Exception:\n return repr(r)\n",
"returnShapes": [
[
"benchmark_verdict",
"leaky_bucket",
"nrr_pct"
],
"invalid_starting_base"
],
"signature": "def compute_net_revenue_retention(inp):",
"submission": "python exposing the entry function; inp is one input object; graded on held-out cases",
"tier": "calculator",
"visibleCases": [
{
"expect": {
"benchmark_verdict": "at-or-above-benchmark",
"leaky_bucket": false,
"nrr_pct": 112
},
"input": {
"benchmark_band": "b2b-saas-good-110",
"churned_mrr": 300,
"contraction_mrr": 500,
"expansion_mrr": 2000,
"starting_mrr": 10000
},
"name": "healthy_expansion"
},
{
"expect": {
"benchmark_verdict": "below-benchmark",
"leaky_bucket": true,
"nrr_pct": 85
},
"input": {
"benchmark_band": "b2b-saas-good-110",
"churned_mrr": 1200,
"contraction_mrr": 800,
"expansion_mrr": 500,
"starting_mrr": 10000
},
"name": "leaky_below_100"
}
],
"vocabulary": [
"at-or-above-benchmark",
"b2b-saas-good-110",
"below-benchmark",
"benchmark_band",
"benchmark_verdict",
"churned_mrr",
"contraction_mrr",
"custom",
"custom_benchmark_pct",
"expansion_mrr",
"invalid_starting_base",
"leaky_bucket",
"nrr_pct",
"starting_mrr"
]
}Get early access to STUD the day it goes live.