Cohort revenue and LTV framework for subscription apps

Net revenue and LTV by monthly cohort for every subscription plan and country, with a forecast for cohorts that have not matured yet.

PythonpandasMLApp Store ConnectApphudUnit economics

LTV in user acquisition: LTV/CAC, ad optimization, ROAS

In a subscription model, users are bought now and the money comes back gradually through renewals. UA decisions therefore depend on a forecast of how much each cohort will pay over its future lifetime (LTV). At Bright Mobile Apps, I built a framework to calculate and forecast LTV by cohort. The company used the framework's LTV in three places:

UA budgets
UA managers compared LTV with CAC for each country and subscription plan to find the break-even point and buy traffic efficiently.
Ad optimization
Ad networks optimized on the trial event. Trial LTV for the country and plan went to them through Amplitude and Apphud as the value of that event, so each trial had its own weight in bidding.
Unit economics
FirstPaid LTV went into ROAS and the company's P&L.

For all three tasks, LTV has to be accurate for each country, plan and monthly cohort.

Before the framework, the company calculated LTV by hand. One calculation took up to a week, because every country needed several extra tables. The forecast still missed actual LTV by up to 50%. UA managers often bought traffic on numbers that later turned out wrong. I built the framework from scratch to solve both problems: it recalculates every plan and country in one run, and its forecast error is 2.6-4.5% MAPE.

Data pipeline: from App Store Connect to Excel tables

  1. Raw data. Two App Store Connect reports (the Sales Report and the Subscription Event Report) give trial starts, first payments, renewals, cancellations, refunds, billing retry and grace periods. Android data comes from Apphud.
  2. Cleaning. Every event with a payment is converted into the net revenue the company receives after commission, taxes and exchange rates.
  3. Monthly cohorts. Users are grouped by the month of their trial start or reactivation. The pipeline counts events for each plan and country: trials, first payments, then each renewal. Refunds are counted too and subtracted from payments.
  4. Forecast. Young cohorts have not lived long enough to reach their later renewals. The forecast uses historical conversion rates from cohorts that have reached those renewals, along with the data already collected for current cohorts.
  5. Output. Each subscription plan gets a separate Excel workbook with a sheet per country plus "World", and a summary workbook combines all plans. Excel was the client's requirement, so the tables could go straight into the P&L.

The whole chain is one Python script on an internal server. A single run produces the reports for every plan and country.

The framework calculates LTV over 1Y, 2Y and longer horizons. For simplicity, the screenshots show the first year (1Y); Fig. 2 also shows the start of the second.

Net price calculation

The price charged depends on the subscriber's cohort. Subscribers usually keep their original price even if the plan price changes. Price changes affect future cohorts and reactivations. Exchange rates, taxes and commission can change over the subscriber's lifetime, so the framework uses the rates in effect on the payment date.

Net(e) = P(plan, country, cohort) / (1 + VAT(country, t)) × (1 − DST(country, t)) × (1 − fee(t)) × FX(currency, t)
  • P is the plan's local price in the country, fixed at the cohort's date.
  • t is the payment date.
  • VAT is the VAT rate in the country on date t. It is included in the price the user pays, so the framework divides it out.
  • DST is the digital services tax rate in the country on date t, applied to the price net of VAT. VAT and DST rates differ by country and change over time, so each country is tracked separately.
  • fee is Apple's commission, taken from the amount left after taxes: 30% in the user's first year of subscription and 15% after that.
  • FX is the USD rate on date t. Future payments use today's rate times a depreciation coefficient, explained below in Exchange-rate inflation.

Countries

Each country has its own local prices, VAT and DST rates, currency, exchange-rate inflation, and its own conversion and renewal rates, so LTV varies by country. I calculate every subscription plan separately for each of 60+ countries. The World sheet is calculated as an integrated result of all countries; the accuracy section below explains why I do not calculate it as one big country with a “.*” filter.

Sheet tabs of one subscription plan's workbook: World, USA, Saudi Arabia, China, Mexico and other countries
Fig. 1Sheet tabs of one plan's workbook: World plus one sheet per country.

Forecasting right-censored cohorts

Young monthly cohorts have not reached their later renewals yet. The framework forecasts those steps and colors them yellow in the tables, so a reader always sees which numbers are forecast.

Why the staircase looks different for each plan

The shape of the staircase depends on the plan's billing period. Each renewal comes one billing period after the previous payment, so every column to the right needs cohorts one period older. For the two-month plan in Fig. 2 the yellow edge moves up two rows per column. For a monthly plan it moves up one row per column, and for a yearly plan twelve rows.

The billing period also sets the width of the first-year table: each plan needs a different number of renewals to cover a full year. A monthly plan has 12 columns, a yearly plan one.

Monthly: 12 payments in year one, step of 1 row
Two-month: 6 payments in year one, step of 2 rows
Yearly: first payment plus the renewal in year two, step of 12 rows
Event counts by monthly cohort for a two-month subscription plan: trial, first payment, the five renewals of the first year and the first renewals of the second, with totals for one and two years. Recent cohorts show a yellow staircase of forecast cells.
Fig. 2Events by monthly cohort, two-month subscription: the first year and the start of the second. Yellow cells are forecast. The grey Total columns sum the payments for the first year and for two years: the first payment and renewals, without trials.
Net revenue in dollars by monthly cohort for the same plan and cohorts, by payment step, with a yearly total
First-year Trial LTV and FirstPaid LTV of the same plan for the same cohorts
Fig. 3Net revenue of the same cohorts, USD (left), and the plan's first-year Trial LTV and FirstPaid LTV (right). Forecast events are priced with the formula above.

Weighted renewal conversions

Each renewal step is forecast as a conversion from the previous step. For young cohorts the framework takes a weighted average over past cohorts, so the average tracks current user behavior. The weighting has three parts:

  • Cohort size. Larger cohorts get more weight, because their conversions are more reliable.
  • Recency. A cohort's weight decays with its age along a power curve; a coefficient sets how fast older cohorts lose weight.
  • Step depth. Later renewal steps average over more cohorts, because fewer users reach them and a single cohort is noisy.
Conversions between payment steps by monthly cohort for the first year of the two-month plan, with the weighted-average row framed in red
Fig. 4First-year conversions, two-month subscription. Each column is the share of users who moved to that step from the previous one; empty cells are steps the cohort has not reached yet. The weighted-average row (red frame) gives the future conversions of young cohorts.

Actual data always wins. When a step has partly happened, the framework keeps the actual numbers and forecasts only the remainder, so the forecast never contradicts what has actually happened.

Exchange-rate inflation

This is one of the framework's most important features: the forecast accounts for currencies losing value against the dollar.

A subscriber pays a price set in local currency. The price does not change, but the number of dollars it brings in follows the exchange rate. Over one year some currencies can lose a lot against the dollar: the Turkish lira, for example, lost 16.2%. A user in Turkey who renews a year later pays the same amount of lira and brings the company about 16% fewer dollars.

Fig. 5Change of local currencies against the US dollar over one year. Each line starts at 0 and shows, in percent, how many fewer dollars the developer gets for a subscription the user bought a year earlier.

If future renewals were priced at a fixed exchange rate, the forecast would overstate revenue. The error would grow with every month a payment lies ahead.

The framework forecasts the future exchange-rate trend with Prophet, an ML model, and works with that curve from then on. The curve is converted into a curve of coefficients: 1 today, lower as the currency weakens. This discounts the actual rate for time. The same model also handles a currency gaining value, which happens too.

Fig. 6Forecast coefficient curve, schematic for the lira. The rate falls unevenly: faster in some months, slower in others. Points mark the renewals that take their coefficient from the curve.

Each forecast renewal of each plan takes the coefficient at its own payment date. The billing period decides which points are used: a monthly plan needs 24 points over two years, a yearly plan 2. Every forecast payment in that currency is multiplied by its coefficient.

In practice this gives two things:

  • Tracking how LTV changes by country as the local currency weakens, which makes subscription pricing decisions more transparent.
  • Managing the product mix. In countries with a weakening currency, long subscriptions gain an extra advantage, because their payments come earlier and suffer less from inflation.

Late first payments (billing retry, grace period)

Renewals are forecast as a chain: each step is a conversion from the previous one, and the first step is the first payment. Counting first payments as accurately as possible is therefore a key task.

Users of a monthly cohort keep subscribing after the cohort closes; in our case this went on until day 37 (+7 days of trial). Some subscriptions arrive late because of billing issues. Apple keeps retrying during billing retry and the grace period, and some of these users pay days or weeks later. The second problem is delayed refunds, which can also come up to two months after the subscription. These delayed events count as late payments, and they have to be forecast correctly.

Fig. 7First payments of one monthly cohort, schematic.

The framework makes its first forecast for a cohort on the 10th day after the month closes, which is day 40 of the cohort: 7 trial days, 2 days of Apple reporting lag and 1 day for time zones. By then, users whose trials ended late in the month are still inside billing retry, so their late payments have not arrived yet. In Fig. 2, part of the yellow FirstPaid value of the latest cohort is still forecast.

Late payments are predicted by ML regression models trained separately on each plan's history, because trial length, price and billing period all affect how many users pay late and how late. The script picks one of three models by the cohort's age on the day it runs: days 0-7, when the cohort has only trials; days 8-37, while regular first charges are still coming in and have to be extrapolated; and day 38 onward, when only the tail of late payments is left.

The inputs are the number of trials in the cohort, the first payments received so far and the cohort's age in days, and the output is the remaining share of first payments, which is added to the actual ones.

How the late-payment model looks
Fig. 8Late-payment model for runs from day 38. Each point is one cohort on one run day. X: cohort age in days on the run day; Y: share of first payments still to come.

This example is a yearly plan. The model approximates the remainders of past cohorts. Its tail runs to 120+ days after the cohort closes. Late payments include a noticeable number of refunds, so the remainder drops below zero between days 70 and 110. The later the run, the more precisely the forecast remainder is determined, as the narrowing tail of all remainders on the chart shows.

Total LTV across all subscription plans

The summary workbook combines revenue from all subscription plans and in-app purchases. Dividing total revenue by the cohort's trials across all plans gives the combined Trial LTV. Dividing it by first payments gives the combined FirstPaid LTV. The workbook includes a table for each country and a worldwide total, so acquisition teams can use these LTV metrics in their campaigns.

All plans combined by monthly cohort for 2025 and 2026: trials and first payments across all plans, first-year revenue of four plans and total revenue of all plans
Integrated first-year Trial LTV and FirstPaid LTV for the same cohorts
Fig. 9All plans combined, first year, World: revenue of four subscription plans ("…" stands for the other plans and products) and total revenue of all plans and products in USD (left), integrated LTV (right).

Forecast accuracy

The forecast error across cohorts is 2.6-4.5% MAPE.

How the error was measured

The framework kept a log of every forecast it made, the Forecast history block of the summary workbook. Each cohort's first forecast is recorded on day 40, the 10th day after its month closes, as total revenue for 1Y, 1-2Ys and 1Y corr.

Months later, when the cohort has matured and its renewals are actual, the saved forecast is compared with the actual revenue. MAPE is the average size of these misses across cohorts, in percent, whatever their direction.

Three design decisions account for most of that accuracy:

  • Late payments are modeled per plan. The manual calculation used one fixed percentage for all plans, which ignored how differently plans behave.
  • Conversions are weighted by cohort size and recency. A simple average gave the same weight to a small, outdated cohort as to a large recent one. The model was very sensitive to outliers.
  • "World" is the sum of country forecasts. Countries convert at different rates, and the USA converts noticeably better than most. A "World" forecast built as one big country carries the old country mix in its history and drifts when a high-converting country's share falls. Adding up country forecasts follows the current mix immediately.

Further development and applications

The framework already computes net revenue for every subscription event and aggregates it by country, plan and monthly cohort. Several extensions can be built on that data:

  • LTV by segment for UA optimizationLTV by ad network, campaign, creative, device and OS version, so UA can set bids per segment.

    Today LTV is split by country, plan and monthly cohort. Adding the acquisition source and user attributes as extra grouping keys would show how much users of the same plan in the same country differ by channel, device or OS version.

    With LTV per segment, UA can raise bids where LTV/CAC is high and cut them where it is low, at the level of a campaign or creative. Apphud and Amplitude already hold most of the attribution data, so the pipeline needs one more grouping key. Small segments need a fallback to the country and plan conversions when they have too few users.

  • Payback and cash-flow planningRevenue by calendar month and the payback period of each cohort.

    The framework already knows how much each cohort will pay and when, after taxes, commission and exchange rates. Re-cut from cohort and step into calendar months, this becomes a monthly revenue forecast. With planned installs added, it also covers cohorts that do not exist yet.

    Finance gets a cash-flow plan, and UA gets the payback period of each cohort: the number of months until its net revenue covers CAC.

  • Use in A/B testingReal-time A/B test dashboards that show the revenue effect of each group.

    A/B tests are usually judged on conversions such as trials and first payments. Conversions can mislead: a cheaper product can bring more payments and less money.

    With LTV by segment from the framework, A/B test dashboards can show the revenue effect of each group in real time. Conclusions then rest on actual revenue as well as on conversions.

  • Price management across storesA service that tracks local prices against the default USD price and adjusts them by preset rules, in any app store.

    Keeping local prices for subscriptions and in-app purchases up to date is a time-consuming task. Exchange rates and taxes need regular monitoring so local prices can be adjusted before net revenue per payment drops well below the intended level. Across dozens of countries and several plans, this becomes a job in its own right. I handled it at my company.

    The framework already computes net revenue per payment after VAT, DST, commission and currency conversion. A service built on it could show each country's price as a percentage of the default USD price, flag countries that fall below a set threshold, and update prices through the store's API (App Store Connect, Google Play Developer API) with preset rules and templates, such as a target range relative to the USD price and rounding to local price points. Prices are fixed per cohort, so the framework can then measure the effect of each change cohort by cohort.

    The service could also apply local pricing conventions, such as when to use a “.99” ending and when to round to a whole number.

  • Monitoring and alertsAutomatic alerts when a cohort's actual conversions move away from the forecast.

    Every cohort has a forecast based on weighted conversions. When actual conversions move away from it by more than normal noise, something has usually changed: failed charges, an App Store policy or price-tier change, a paywall broken by an app update, or lower traffic quality from one network.

    A check after each run could flag these cohorts and countries, so the team sees the problem within days, before it shows up in the monthly report.