DEV Community

Felix ZHU
Felix ZHU

Posted on Originally published at nicheaitool.com

Built a Free SaaS Metrics Calculator — Here's the Math Behind It

As a developer, I hate spreadsheets.

Every time I needed to calculate runway, LTV, or CAC payback for a project, I'd open Google Sheets, build a formula, and inevitably mess up the cell references. After the third time I accidentally calculated runway using the wrong burn rate, I decided to build a tool.

The result: a free SaaS Revenue Calculator that runs entirely in the browser.

The Math Behind the Metrics
Here's what the calculator computes and how.

Runway
javascript
// Runway = Cash in bank / Net monthly burn
const runway = cashInBank / netBurn;

// Net burn = Monthly costs - MRR
const netBurn = monthlyCosts - mrr;

// If netBurn is negative, you're profitable and runway is infinite
if (netBurn <= 0) return Infinity;
Runway tells you how many months until you run out of cash. If your MRR exceeds operating costs, you're profitable and runway is effectively infinite.

LTV (Lifetime Value)
javascript
// LTV = ARPU / Monthly churn rate
const arpu = mrr / activeCustomers;
const ltv = arpu / monthlyChurnRate;
LTV is how much revenue an average customer generates before they churn. Higher is better. A healthy LTV:CAC ratio is 3:1 or higher.

CAC Payback
javascript
// CAC Payback = CAC / (ARPU * Gross Margin)
const cacPayback = cac / (arpu * grossMargin);
CAC payback is how many months it takes to recover acquisition costs. Under 12 months is good. Under 6 months is excellent.

Why I Built This
I was tired of:

Manual calculations — Building the same formulas in every new spreadsheet

Opaque tools — Existing calculators that don't show their math

Paywalls — Tools that charge $50/month for basic arithmetic

The calculator is free, runs locally, and shows you exactly how each metric is computed.

Technical Implementation
The calculator is a single HTML file with vanilla JavaScript. No frameworks, no build step, no dependencies. It runs entirely client-side — your financial data never leaves your browser.

Key design decisions:

Real-time updates: Every input change recalculates all metrics instantly

12-month projection: Uses compound growth to project MRR forward

Health indicators: Each metric shows a green/yellow/red status based on benchmarks

When to Use This
Before a fundraise — Investors will ask about LTV:CAC, CAC payback, and net burn. Get your numbers straight.

When deciding to hire — See how adding a salary affects your runway.

When evaluating churn — Model how reducing churn from 5% to 3% changes LTV and runway.

→ Try the calculator

FAQ
Can I self-host this?

The calculator is a static HTML file. You can save it locally and run it offline.

Does it store my data?

No. Everything runs in your browser. No server calls, no analytics, no storage.

What's Next
I'm planning to add:

Scenario comparison (side-by-side what-if analysis)

Export to CSV/PDF

Cohort retention modeling

If you have feature requests, let me know.

Disclosure: This article contains affiliate links. If you sign up through these links, we may earn a commission at no extra cost to you.

Top comments (0)