Profit and metrics

Shopify customer lifetime value: calculate and use it

Shopify customer lifetime value explained: historical vs predicted LTV, revenue vs gross profit, LTV:CAC and payback, with a worked example.

·9 min read·By the ROASaurus team

Key takeaways
  • Customer lifetime value is what a group of customers buys, or the gross profit it leaves, in a fixed window after the first order.
  • Compare LTV with CAC on gross profit, not revenue: in the example, an LTV:CAC of 3.5 on revenue is only 1.58 on gross profit.
  • Count only customers who are old enough for the window, and compare channels and first products over the same window.
  • The payback period, the months until gross profit per customer covers CAC, shows how long acquisition ties up cash.
  • Predicted LTV helps with decisions that cannot wait, but check it against historical LTV as the months pass.

Shopify customer lifetime value (LTV or CLV) is the revenue a customer brings in, or better the gross profit they leave, from their first order onward. To make it useful, measure it for a group of customers over a fixed window, such as the 12 months after the first order, and compare it with what it cost to acquire them.

This guide covers historical and predicted LTV, revenue LTV and gross-profit LTV, a worked example with LTV:CAC and payback, LTV per channel and first product, and exactly what ROASaurus calculates.

What is customer lifetime value?

LTV is the total value of a customer over their relationship with your store. "Lifetime" sounds open-ended, but in practice you always measure it over a window: 90 days, 6 months, 12 months or 24 months after the first order. Without a window, older customers always look more valuable than newer ones, only because they have had more time to buy.

LTV (12 months)=value bought in the 12 months after the first order ÷ customers in the group
Value
Revenue without VAT and after refunds, or gross profit: revenue minus product cost, shipping, payment fees and handling.
Group
Customers whose first order fell in the same period, all old enough to have had the full 12 months.

1,000 customers who first ordered in January spent $105,000 in the 12 months that followed, first orders included. Their 12-month revenue LTV is $105.

Groups matter because one customer tells you little. Group customers by the month of their first order, which is called a cohort. Then compare cohorts, channels or first products with each other. Our guide to cohort analysis for webshops shows how to read such a table.

Historical LTV vs predicted LTV

Historical LTV is what customers actually bought. It is exact, but it needs time: a 12-month LTV only exists for customers who first ordered at least 12 months ago. If you average in younger customers, the number drops, because they have not had the time yet.

Predicted LTV estimates what customers will buy over a future window, based on how earlier customers behaved. Tools do this in different ways and with different data requirements:

  • Shopify's customer cohort analysis report can show projections of the amount spent per customer, based on the previous 24 months of the store's own data. Without 24 months of data, the option does not appear.
  • Klaviyo shows a predicted customer lifetime value per profile when, among other requirements, at least 500 customers have placed an order and the account has at least 180 days of order history.
Historical LTV
  • What customers really bought
  • Needs customers old enough for the window
  • Use it to judge past acquisition spend
Predicted LTV
  • An estimate from earlier customers
  • Available for new customers right away
  • Use it for bids and budgets you set now
Use both: predict for the decisions you make today, then check the prediction against history as the months pass.

Revenue LTV vs gross-profit LTV

Shopify's cohort report and Klaviyo's customer lifetime value are both based on what customers spend. Revenue LTV is easy to calculate, but you cannot compare it with acquisition cost, because only the margin pays for ads. Gross-profit LTV subtracts product cost, shipping, payment fees and handling from every order.

Example: two product lines with the same 12-month revenue LTV
Revenue LTVGross-profit LTV
Own-brand skincare (58% margin)
$140.00
$81.20
Resold electronics (22% margin)
$140.00
$30.80
The same $140 of revenue per customer leaves $81.20 in one case and $30.80 in the other. Only the gross-profit number can be compared with CAC.

If a customer costs $45 to acquire, the skincare customer pays it back 1.8 times over. The electronics customer does not, even though both have the same revenue LTV. Our guide to contribution margin in ecommerce explains gross profit per order and every other layer from revenue to net profit.

How to calculate LTV: a worked example

An example store acquired 1,000 new customers in January. Their average first order was $60 without VAT, and the store's gross margin rate is 45%. In January, the store spent $30,000 on ads, so its CAC (customer acquisition cost) is $30,000 ÷ 1,000 = $30.

Months after first orderCumulative revenue per customerCumulative gross profit per customerGross profit ÷ CAC
M0 (first month)$60.00$27.000.90
M1$66.00$29.700.99
M2$72.00$32.401.08
M3$78.00$35.101.17
M6$90.00$40.501.35
M12$105.00$47.251.58
Example store, January cohort. M0 is the month of the first order. The cohort pays back its $30 CAC in M2, two months after the first order.
Example store: cumulative gross profit per customer against CAC
Gross profit per customerCAC
$50$0
M0M1M2M3M4M5M6M7M8M9M10M11M12
The gross profit line crosses CAC in M2. Every month after that adds profit on a customer who is already paid for.

Three numbers come out of this example:

  • 12-month LTV: $105 in revenue and $47.25 in gross profit per customer.
  • LTV:CAC: $47.25 ÷ $30 = 1.58 on gross profit. On revenue it would be $105 ÷ $30 = 3.5, which looks much better than it is.
  • Payback period: 2 months, the first month in which cumulative gross profit per customer covers CAC.

LTV:CAC and payback: how to use them

LTV:CAC=gross-profit LTV over a fixed window ÷ CAC
CAC
Ad spend in a period ÷ new customers acquired in that period. Returning customers do not count.
Window
The same window for every group you compare, for example 6 or 12 months.

On gross profit, an LTV:CAC of 1.0 is break-even over the window you chose. Below 1.0, the customers have not yet earned back what they cost. How far above 1.0 you need to be depends on your fixed costs and on how long you can wait for the money. No single ratio fits every store.

The payback period matters for cash. A store that pays back CAC on the first order gets its acquisition money back right away. A store with a 6-month payback has to fund 6 months of acquisition before the money comes back.

Turn LTV into a maximum CAC

Decide how long a payback you accept, then read the gross profit per customer at that point. In the example, a 6-month payback allows a CAC of up to $40.50. That is more than the $27 gross profit of the first order. So a campaign can run below its first-order break-even ROAS on purpose, as long as its customers keep ordering again.

Ad platforms can use this too. Google Ads has a customer acquisition goal that, in its new customer value mode, bids higher for new customers than for existing ones. Your gross-profit LTV is a sound basis for the extra value you give a new customer there.

LTV per acquisition channel and first product

A store-wide LTV hides the differences that matter for your budget. Split it by the channel that brought the first order, and by the first product a customer bought.

Channel of first orderNew customersCAC180-day gross-profit LTVLTV:CAC
Meta820$34$41.001.21
Google Ads410$29$53.001.83
TikTok350$26$30.001.15
Example store, 180 days after the first order. TikTok brings the cheapest customers, but Google Ads customers return the most gross profit per dollar of CAC.

First product works the same way. Customers whose first order is a product that runs out, such as a refill, have a reason to come back. Customers who first buy a product that lasts for years have less reason. Group customers by first product and compare them over the same 180 days.

Two rules keep these comparisons fair. Compare every group over the same window, using only customers who are old enough for it. And be careful with small groups: with 15 customers, one large order moves the average a lot.

Common LTV mistakes

  • Comparing revenue LTV with CAC. Only the margin pays for ads, so compare gross-profit LTV with CAC.
  • Mixing young and old customers. A 12-month LTV that includes customers who first ordered last month is too low.
  • Counting VAT and refunds as value. Use revenue without VAT and after refunds.
  • Dividing ad spend by all customers. CAC divides by new customers only. Returning customers did not need to be acquired.
  • Treating sale cohorts like the rest. Customers acquired with a large discount can order again less often, and their first order has a lower margin. Look at them as a separate group.

What ROASaurus calculates

ROASaurus builds LTV from the orders it already receives from Shopify or your webshop connector, and from the product costs in profit analytics. Each customer is identified by Shopify customer id or email. Orders with neither are left out, because they cannot be linked to a repeat order. Pending, authorized, voided and cancelled orders do not count.

  • Per order: revenue after refunds, and the margin after product costs, shipping, order fees, payment fees, handling and pass-through tax. The lifetime value reports call this margin contribution margin. It is before ad spend, so it matches gross profit as this guide defines it. The revenue metrics and the Cumulative gross profit per customer metric keep the tax you collected in, unless Taxes collected is set to Left out of revenue under Profit › Cost settings.
  • Cohorts: customers grouped by the week, month, quarter or year of their first order, with 14 metrics, such as Cumulative revenue per customer, Cumulative contribution margin per customer and Contribution margin after CAC per customer. CAC per cohort is the ad spend in the cohort's period ÷ every new customer acquired in it. A green outline marks the period in which a cohort paid back its CAC.
  • Predicted LTV: at 3, 6, 12 and 24 months, per customer, in revenue and in margin. The store's own repeat curve gives the average value customers bought in each month after their first order. It counts only customers old enough for that month, one-time buyers included. Months with fewer than 20 such customers continue the curve at its observed month-over-month decay.
  • Personal factor: each prediction is the customer's value so far plus the curve for the months still ahead. The curve part is multiplied by a factor: 0.5 for a one-time buyer, 1 for an average customer and 2 for a customer whose repeat orders are worth three times the average for their age. Customers younger than one month keep a factor of 1.
  • Chance of a second order: of the customers still at one order after 30, 60, 90, 180 or 365 days, the share who ordered again in the following 6 months.
  • LTV drivers: first-order attributes, such as first product, discount code, country, first ad channel or UTM source, ranked by LTV over the same 90, 180 or 365 days. Only customers at least that old count, and a group needs at least 5 customers.
  • Campaign profit: on the Marketing page in profit analytics, the 90-day LTV of the new customers each campaign brought in, in margin, and LTV:CAC, under the attribution model you choose.
  • RFM segments: 11 segments from recency, frequency and revenue scores. With a Klaviyo private API key, each segment can be kept in a Klaviyo list that updates daily, with the predicted 12-month LTV on each profile.

CAC uses the ad spend synced from your connected ad accounts, plus any ad spend you enter by hand for other channels. Cohort CAC divides by every new customer, including customers who did not come through an ad, so it is a blended CAC. The lifetime value page lists every report.

Sources

  1. Shopify Help Center: Customers reports
  2. Klaviyo Help Center: Understanding Klaviyo's predictive analytics
  3. Google Ads Help: About customer lifecycle goals

In ROASaurus

Keep reading

Profit and metricsBreak-even ROAS: the minimum ROAS your ads needBreak-even ROAS is the ROAS at which ads pay for themselves. Learn the formula, work through examples and set a target ROAS for each product line.Profit and metricsCohort analysis for ecommerce: are new customers worth it?Cohort analysis for ecommerce: group customers by first-order month, read retention and gross profit per customer, and avoid the common mistakes.Profit and metricsContribution margin in ecommerce: CM1, CM2, CM3 explainedContribution margin in ecommerce explained: CM1, CM2 and CM3, a worked example from revenue to net profit, and which profit layer fits which decision.
FAQ

Questions, answered

How do I calculate customer lifetime value on Shopify?

Group customers by the month of their first order. Add up what each group bought in a fixed window, such as 12 months, and divide by the number of customers. Use revenue without VAT and after refunds, or better, gross profit.

What is a good LTV to CAC ratio?

There is no single good ratio. On gross profit, 1.0 means customers earned back their acquisition cost within the window you measured. How far above 1.0 you need to be depends on your fixed costs and how long you can wait for the money to come back.

What is the difference between historical and predicted LTV?

Historical LTV is what customers actually bought, counted only for customers old enough for the window. Predicted LTV estimates future purchases from how earlier customers behaved, so it is available sooner but depends on the model and the amount of data.

Should LTV be based on revenue or profit?

Use gross profit when you compare LTV with acquisition cost, because only the margin pays for ads. Revenue LTV is fine for spotting trends, but it makes every channel look better than it is.

What is CAC payback?

It is the number of months until the cumulative gross profit per customer covers what it cost to acquire them. A short payback means the money you spend on acquisition comes back quickly.

Does Shopify show customer lifetime value?

Shopify has a customer cohort analysis report that shows the amount spent per customer by cohort, with projections once the store has 24 months of data. Its metrics are customer counts and sales, not profit after shipping and fees.

Every sale, traced to the ad that earned it

Server-side tracking, profit and lifetime value in one app. 14-day free trial, no credit card.

Start your free trial →