SaaS metrics calculator

Normalize subscription plans to MRR, then see ARR, ARPU, logo and revenue churn, simple LTV, and revenue per visitor. Free, in your browser, with the formulas shown.

The first three rows are a hypothetical book: 40 monthly plans at 30, 10 yearly plans at 120, and 5 monthly plans at 50 with quantity 2. They are not a benchmark and not the live demo. Amounts are in the currency you pick. Changing the currency relabels the symbol and rounding. It does not convert.

Plan 1

40 × $30.00 × 1 ÷ 1 = $1,200.00

Plan 2

10 × $120.00 × 1 ÷ 12 = $100.00

Plan 3

5 × $50.00 × 2 ÷ 1 = $500.00

Optional period inputs

Leave these blank to skip the metric. Churned MRR is recurring revenue lost to cancellations and downgrades. Logos lost is the number of customers who left. Starting values are optional overrides.

Monthly recurring revenue
$1,800.00
Annual recurring revenue
$21,600.00

ARR = MRR × 12 = $1,800.00 × 12

ARPU
$32.73

MRR ÷ 55 paying subscriptions. Seats: 60.

Logo churn
—

Enter logos lost. Optionally enter starting logos.

Revenue churn
—

Enter churned MRR. Optionally enter starting MRR.

Simple LTV
—

LTV = ARPU ÷ logo churn. It stays blank when logo churn is missing or zero.

Revenue per visitor
—

Enter visitors above zero. This uses MRR, not cash collected.

A fixed discount is subtracted from one subscription's price × quantity for that billing period, then the remainder is normalized. A percent discount scales that same period amount. Quantity is seats on each subscription, so it changes MRR and does not, by itself, change the logo count.

Link to this tool

The calculator is free to share. Copy a URL or a Markdown link.

URL
https://datalighthouse.dev/tools/saas-metrics-calculator
Markdown
[SaaS metrics calculator](https://datalighthouse.dev/tools/saas-metrics-calculator)

Formulas

The calculator runs in your browser. These are the same formulas it uses. A row is a group of identical subscriptions. price is the amount billed each period, before the discount. quantity is the units on each subscription. A fixed discount is subtracted from price × quantity for that period. A percent discount scales that period amount. The result cannot go below zero.

  • Monthly amount = subscriptions × discounted period amount × factor.
  • Monthly factor = 1. Quarterly is a 3-month interval, so the factor is 1/3. Yearly factor = 1/12. Weekly factor = 52/12.
  • MRR = the sum of those monthly amounts. Trialing rows are excluded.
  • ARR = MRR × 12, after MRR is rounded.
  • ARPU = MRR ÷ non-trialing subscriptions whose discounted period amount is still above zero.
  • Logo churn = logos lost ÷ starting logos. If starting logos is blank, the denominator is current paying subscriptions + logos lost.
  • Revenue churn = churned MRR ÷ starting MRR. If starting MRR is blank, the denominator is current MRR + churned MRR.
  • Simple LTV = ARPU ÷ logo churn. Undefined when logo churn is zero. The Stripe procedure, including invoices and a gross margin you supply, is how to calculate customer lifetime value from Stripe.
  • Revenue per visitor = MRR ÷ visitors. That is a recurring run-rate per visitor, not cash collected.

The assumed denominators match a starting base only when the period had no new subscriptions and no expansion MRR. Enter a starting value when you have one. Revenue churn here is gross: expansion is not subtracted, so the rate is not negative. The 52/12 weekly factor and the 365/12 daily factor in the TypeScript function are this page's run-rate convention. Stripe does not return them.

How to compute MRR from Stripe subscription data

If the subscriptions are already in a Dashboard CSV, the Stripe MRR CSV calculator reads that file in your browser and calls this normalizer once per currency. The file is not uploaded.

Stripe's Subscription object has no MRR field. You compute a monthly run-rate from subscription items. The steps below match the Subscription, Price, Subscription Item, Coupon, and Discount objects as documented on 10 November 2026.

  1. List subscriptions with status=active. List subscriptions returns subscriptions that have not been canceled when status is omitted, which still includes trialing and incomplete. Possible statuses are incomplete, incomplete_expired, trialing, active, past_due, canceled, unpaid, and paused. A trialing subscription is in a trial. For collection_method=charge_automatically, incomplete means the first payment has not succeeded, and the subscription becomes incomplete_expired if it is still unpaid after 23 hours. Counting only active leaves those out. past_due means payment is required and has not succeeded, and the subscription can still generate invoices. Keeping it in MRR is a policy choice. This function leaves it out, along with unpaid, paused, and canceled.
  2. Paginate. List methods use limit, starting_after, and ending_before. The default limit is 10 and the maximum is 100. has_moreis false on the last page. Stripe's client libraries also offer auto-pagination.
  3. Read every subscription item. A subscription can hold more than one price, each with its own quantity, and those prices share one currency because they are invoiced together. Quantities documents a flexible billing mode limit of 100 items and a classic mode limit of 20. items is a list. If items.has_more is true, request the rest from the list URL on that object.
  4. For each item, use price.unit_amount (or unit_amount_decimal when the integer is absent), price.currency, price.recurring.interval, price.recurring.interval_count, and quantity. unit_amount is set only when billing_scheme is per_unit, in the currency's smallest unit. Interval is day, week, month, or year. interval=month and interval_count=3 bills every 3 months. A null quantity is treated as 1. usage_type=licensed bills the quantity on the item. usage_type=metered bills recorded usage, which this function does not have, so metered prices are skipped. Tiered prices have no unit_amount and are skipped. transform_quantity is not applied.
  5. Convert minor units, then normalize the interval. For a two-decimal currency, amount 100 is 1.00. Stripe's zero-decimal list, retrieved 10 November 2026, is BIF, CLP, DJF, GNF, JPY, KMF, KRW, MGA, PYG, RWF, UGX, VND, VUV, XAF, XOF, and XPF. The same page says UGX amounts stay two-decimal for backwards compatibility, so 5 UGX is amount 500, and the function divides UGX by 100. The currencies page also describes three-decimal currency support. This function does not assume a divisor for those currencies. Pass minorUnitFactor, such as 1000, when you already know it. Monthly normalization divides a month by interval_count, a year by 12 × interval_count, multiplies a week by 52/12, and multiplies a day by 365/12.
  6. Apply discounts after you expand them. Stripe applies subscription item discounts before subscription discounts. A coupon duration is forever (all charges), once (the first charge, so it is left out of MRR), or repeating (the first duration_in_months). On the Discount object, end is the end of a repeating discount and is null for once or forever. percent_off of 50 takes half off the invoice subtotal. amount_off is a minor-unit amount in the coupon currency, taken off the subtotal for that billing period, then normalized with the same interval factor. An unexpanded discount id is skipped. The function reads discounts on the subscription and its items only.
  7. Sum the monthly amounts. The first priced item chooses the currency, and items in another currency are skipped. Do not add the latest charge or invoice. Cash collected is a different report. ARR in the function is the rounded MRR multiplied by 12.

Copy the normalizer

The TypeScript below is MIT licensed. It is the file lib/tools/stripe-mrr.ts in this repository, and the unit tests cover interval normalization, quantity, multi-item subscriptions, discounts, and the statuses left out of MRR. Copy it into your own project and keep the copyright notice. The guide to calculating MRR from the Stripe API calls this function after it lists active, trialing, and past_due subscriptions with auto-pagination.

stripe-mrr.ts (MIT)
/**
 * MIT License
 *
 * Copyright (c) 2026 Data Lighthouse
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 * Normalize Stripe subscription items to monthly recurring revenue.
 *
 * Stripe does not return an MRR field. This function counts status "active"
 * only, so trialing, incomplete, and incomplete_expired are excluded, along
 * with past_due, unpaid, paused, and canceled. past_due is a policy choice:
 * Stripe still generates invoices in that status. This function leaves it out.
 *
 * Intervals use this run-rate convention, which is not a Stripe field:
 * month / interval_count, year / (12 * interval_count),
 * week * 52/12 / interval_count, day * 365/12 / interval_count.
 * A quarter is interval "month" with interval_count 3.
 *
 * Item discounts apply before subscription discounts. Duration "once" does not
 * change MRR. Repeating discounts apply while `end` is null or still in the
 * future. Amount-off coupons are minor units for that billing period and are
 * normalized with the same interval factor. Expand discounts. A string id is
 * counted in `unexpandedDiscounts` and does not change the amount.
 *
 * Quantity null is treated as 1. Metered prices and prices with no unit_amount
 * (including tiered prices) are skipped. transform_quantity is not applied.
 * The first priced item picks the currency. Later items in another currency
 * are skipped. Pass `minorUnitFactor` for a three-decimal currency.
 */

export type BillingInterval = "day" | "week" | "month" | "year"

const BILLING_INTERVALS = new Set<BillingInterval>(["day", "week", "month", "year"])

/**
 * Zero-decimal currencies published on Stripe's currencies guide, excluding UGX.
 * UGX is on that list, and the same guide's special cases say API amounts for
 * UGX stay two-decimal for backwards compatibility (5 UGX is amount 500).
 * https://docs.stripe.com/currencies#zero-decimal
 */
const ZERO_DECIMAL_CURRENCIES = new Set([
  "bif",
  "clp",
  "djf",
  "gnf",
  "jpy",
  "kmf",
  "krw",
  "mga",
  "pyg",
  "rwf",
  "vnd",
  "vuv",
  "xaf",
  "xof",
  "xpf",
])

export function minorUnitFactor(currency: string): number {
  const code = currency.toLowerCase()
  if (code === "ugx") return 100
  if (ZERO_DECIMAL_CURRENCIES.has(code)) return 1
  return 100
}

export function monthlyNormalizationFactor(interval: BillingInterval, intervalCount: number): number {
  const count = Number.isFinite(intervalCount) && intervalCount > 0 ? intervalCount : 1
  switch (interval) {
    case "year":
      return 1 / (12 * count)
    case "week":
      return 52 / 12 / count
    case "day":
      return 365 / 12 / count
    case "month":
      return 1 / count
    default:
      return 0
  }
}

export function subscriptionCountsTowardMrr(status: string | null | undefined): boolean {
  return status === "active"
}

export interface StripeCouponLike {
  percent_off?: number | null
  amount_off?: number | null
  currency?: string | null
  duration?: "forever" | "once" | "repeating" | string | null
}

export interface StripeDiscountLike {
  end?: number | null
  source?: { coupon?: string | StripeCouponLike | null } | null
  coupon?: string | StripeCouponLike | null
}

export interface StripePriceLike {
  unit_amount?: number | null
  unit_amount_decimal?: string | null
  currency?: string | null
  billing_scheme?: string | null
  recurring?: {
    interval?: string | null
    interval_count?: number | null
    usage_type?: string | null
  } | null
}

export interface StripeSubscriptionItemLike {
  quantity?: number | null
  discounts?: Array<string | StripeDiscountLike> | null
  price?: StripePriceLike | null
}

export interface StripeSubscriptionLike {
  status?: string | null
  discounts?: Array<string | StripeDiscountLike> | null
  items?: { data?: Array<StripeSubscriptionItemLike> | null } | null
}

export interface NormalizeStripeMrrOptions {
  now?: Date
  /** Divisor for the locked currency. Use 1000 for a three-decimal currency. */
  minorUnitFactor?: number
}

export interface NormalizedStripeMrr {
  /** Major units. */
  mrr: number
  /** Rounded MRR × 12. */
  arr: number
  currency: string | null
  excludedSubscriptions: number
  skippedItems: number
  mixedCurrencyItems: number
  unexpandedDiscounts: number
}

interface NormalizedDiscount {
  percentOff: number | null
  amountOff: number | null
  currency: string | null
  duration: "forever" | "once" | "repeating"
  end: number | null
}

function roundMajor(amount: number, factor: number): number {
  const digits = factor === 1 ? 0 : factor === 1000 ? 3 : factor === 100 ? 2 : Math.max(0, Math.round(Math.log10(factor)))
  const scale = 10 ** digits
  return Math.round((amount + Number.EPSILON) * scale) / scale
}

/** Round a major-unit amount the same way `normalizeStripeSubscriptionMrr` rounds MRR and ARR. */
export function roundMajorCurrency(amount: number, factor: number): number {
  return roundMajor(amount, factor)
}

function discountApplies(discount: NormalizedDiscount, nowUnix: number): boolean {
  if (discount.duration === "once") return false
  if (discount.duration === "forever") return true
  if (discount.duration === "repeating") return discount.end == null || discount.end > nowUnix
  return false
}

function readCoupon(discount: StripeDiscountLike): StripeCouponLike | null {
  const coupon = discount.source?.coupon ?? discount.coupon
  if (!coupon || typeof coupon === "string") return null
  return coupon
}

function toDiscount(discount: string | StripeDiscountLike, stats: { unexpandedDiscounts: number }): NormalizedDiscount | null {
  if (typeof discount === "string") {
    stats.unexpandedDiscounts += 1
    return null
  }
  const coupon = readCoupon(discount)
  if (!coupon) {
    stats.unexpandedDiscounts += 1
    return null
  }
  if (coupon.duration !== "forever" && coupon.duration !== "once" && coupon.duration !== "repeating") return null
  return {
    percentOff: coupon.percent_off ?? null,
    amountOff: coupon.amount_off ?? null,
    currency: coupon.currency ?? null,
    duration: coupon.duration,
    end: discount.end ?? null,
  }
}

function readUnitAmount(price: StripePriceLike): number | null {
  if (typeof price.unit_amount === "number" && Number.isFinite(price.unit_amount)) return price.unit_amount
  if (typeof price.unit_amount_decimal === "string" && price.unit_amount_decimal.trim() !== "") {
    const parsed = Number(price.unit_amount_decimal)
    return Number.isFinite(parsed) ? parsed : null
  }
  return null
}

function applyDiscounts(
  monthlyMinor: number,
  discounts: NormalizedDiscount[],
  interval: { interval: BillingInterval; intervalCount: number } | null,
  currency: string,
  nowUnix: number,
): number {
  let amount = monthlyMinor
  for (const discount of discounts) {
    if (!discountApplies(discount, nowUnix)) continue
    if (typeof discount.percentOff === "number" && discount.percentOff > 0) {
      amount *= 1 - Math.min(discount.percentOff, 100) / 100
      continue
    }
    if (typeof discount.amountOff === "number" && discount.amountOff > 0 && interval) {
      if (discount.currency && discount.currency.toLowerCase() !== currency) continue
      amount -= discount.amountOff * monthlyNormalizationFactor(interval.interval, interval.intervalCount)
    }
  }
  return Math.max(0, amount)
}

export function normalizeStripeSubscriptionMrr(
  subscriptions: StripeSubscriptionLike[],
  options: NormalizeStripeMrrOptions = {},
): NormalizedStripeMrr {
  const nowUnix = Math.floor((options.now ?? new Date()).getTime() / 1000)
  const stats = { unexpandedDiscounts: 0 }
  let currency: string | null = null
  let excludedSubscriptions = 0
  let skippedItems = 0
  let mixedCurrencyItems = 0

  const active = subscriptions.filter((subscription) => {
    if (subscriptionCountsTowardMrr(subscription.status)) return true
    excludedSubscriptions += 1
    return false
  })

  for (const subscription of active) {
    for (const item of subscription.items?.data ?? []) {
      const price = item.price
      if (!price || price.billing_scheme === "tiered" || price.recurring?.usage_type === "metered") continue
      const unitAmount = readUnitAmount(price)
      const intervalRaw = price.recurring?.interval
      if (unitAmount == null || !price.currency || !intervalRaw || !BILLING_INTERVALS.has(intervalRaw as BillingInterval)) continue
      currency = price.currency.toLowerCase()
      break
    }
    if (currency) break
  }

  if (!currency) {
    for (const subscription of active) {
      skippedItems += subscription.items?.data?.length ?? 0
    }
    return { mrr: 0, arr: 0, currency: null, excludedSubscriptions, skippedItems, mixedCurrencyItems, unexpandedDiscounts: stats.unexpandedDiscounts }
  }

  const factor = options.minorUnitFactor && options.minorUnitFactor > 0 ? options.minorUnitFactor : minorUnitFactor(currency)
  let monthlyMinor = 0

  for (const subscription of active) {
    let subscriptionMinor = 0
    let anchor: { interval: BillingInterval; intervalCount: number } | null = null
    for (const item of subscription.items?.data ?? []) {
      const price = item.price
      const usageType = price?.recurring?.usage_type
      if (!price || price.billing_scheme === "tiered" || usageType === "metered") {
        skippedItems += 1
        continue
      }
      const unitAmount = readUnitAmount(price)
      const intervalRaw = price.recurring?.interval
      const interval = intervalRaw && BILLING_INTERVALS.has(intervalRaw as BillingInterval) ? (intervalRaw as BillingInterval) : null
      if (unitAmount == null || !interval) {
        skippedItems += 1
        continue
      }
      if (!price.currency || price.currency.toLowerCase() !== currency) {
        mixedCurrencyItems += 1
        continue
      }
      const intervalCount = price.recurring?.interval_count && price.recurring.interval_count > 0 ? price.recurring.interval_count : 1
      const intervalRef = { interval, intervalCount }
      if (!anchor) anchor = intervalRef
      const quantity = item.quantity == null || !Number.isFinite(item.quantity) ? 1 : item.quantity
      if (quantity < 0) {
        skippedItems += 1
        continue
      }
      const itemDiscounts = (item.discounts ?? [])
        .map((discount) => toDiscount(discount, stats))
        .filter((discount): discount is NormalizedDiscount => discount !== null)
      subscriptionMinor += applyDiscounts(
        unitAmount * quantity * monthlyNormalizationFactor(interval, intervalCount),
        itemDiscounts,
        intervalRef,
        currency,
        nowUnix,
      )
    }
    const subscriptionDiscounts = (subscription.discounts ?? [])
      .map((discount) => toDiscount(discount, stats))
      .filter((discount): discount is NormalizedDiscount => discount !== null)
    monthlyMinor += applyDiscounts(subscriptionMinor, subscriptionDiscounts, anchor, currency, nowUnix)
  }

  const mrr = roundMajor(monthlyMinor / factor, factor)
  const arr = roundMajor(mrr * 12, factor)
  return {
    mrr,
    arr,
    currency,
    excludedSubscriptions,
    skippedItems,
    mixedCurrencyItems,
    unexpandedDiscounts: stats.unexpandedDiscounts,
  }
}

Questions

What does this calculator include in MRR?

Each row is a group of identical subscriptions. Monthly recurring revenue adds price times quantity, after a percent discount or minus a fixed discount, then normalizes that billing period to one month. A monthly price is divided by 1, a quarterly price is a 3-month interval and is divided by 3, a yearly price is divided by 12, and a weekly price is multiplied by 52/12. The subscription count multiplies that monthly amount. Rows marked trialing are left out. ARR is that MRR multiplied by 12.

How do you calculate MRR from Stripe subscriptions?

Stripe does not return an MRR field on the Subscription object. List subscriptions with status=active. Omitting status returns subscriptions that have not been canceled, including trialing and incomplete. Paginate while has_more is true. The default limit is 10 and the maximum is 100. For each item, multiply price.unit_amount by quantity, convert the currency's minor units, and normalize price.recurring.interval and interval_count. Stripe applies subscription item discounts before subscription discounts. Skip metered prices and prices with no unit_amount. The MIT-licensed function on this page does that normalization.

How are logo churn and revenue churn calculated?

Logo churn divides logos lost by logos at the start of the period. Revenue churn divides churned MRR by MRR at the start. If you leave the starting value blank, the calculator uses current paying subscriptions plus logos lost, and current MRR plus churned MRR. That equals a starting base only when new subscriptions and expansion MRR during the period are zero. This is gross revenue churn, so it is not negative. Net revenue churn, which subtracts expansion, is a different formula.

How is simple LTV calculated?

Simple revenue LTV is ARPU divided by the logo churn fraction. ARPU here is MRR divided by non-trialing subscriptions whose price is still above zero after the discount. LTV is undefined when logo churn is zero. The figure is revenue, not profit. It does not multiply by gross margin, and it does not use revenue churn.

What is revenue per visitor in this calculator?

Revenue per visitor here is MRR divided by the visitor count you enter. It is a recurring run-rate per visitor. Cash revenue per visitor uses money collected in a period instead. The Data Lighthouse overview divides succeeded Stripe charges for 7, 14, or 30 days by distinct Postgres visitors in that same window.

Sources

Data Lighthouse is a $59 one-time Next.js Stripe analytics dashboard template. The overview computes MRR and ARR from active Stripe subscriptions with this monthly normalization, and revenue per visitor from succeeded charges divided by Postgres visitors. It does not compute churn, ARPU, or LTV. The live demo uses sample data.