Customer lifetime value (LTV) in ecommerce measures the total revenue, or profit, a single customer generates over their entire relationship with your store. The simplest formula multiplies a customer’s average annual contribution margin by the number of years they remain a customer. But the version you should use depends on whether you want a quick snapshot of past performance or a forward-looking number you can use to guide ad spend and growth decisions.
The Basic LTV Formula
The foundational calculation, as taught at Harvard Business School, is straightforward:
LTV = m × T
- m = customer contribution margin per year (the revenue an average customer brings in minus the cost to serve them, per year)
- T = customer lifetime in years (the average length of time a customer keeps buying from you)
If your average customer spends $200 a year after subtracting product costs and shipping, and they stick around for 3 years, your LTV is $600. That single number tells you the upper bound of what you can spend to acquire one customer and still turn a profit.
Choosing Revenue vs. Profit-Based LTV
Many ecommerce operators start by calculating LTV using gross revenue, which is the total dollar amount customers spend. This is easy to pull from your store’s analytics, but it overstates how much a customer is actually worth to your business. A $100 order where $55 goes to product costs, shipping, and packaging only puts $45 in your pocket.
A more useful version uses gross margin: revenue minus cost of goods sold (COGS), which includes the direct costs of producing or purchasing your products, plus shipping and fulfillment expenses. If you want an even sharper number, subtract returns and discounts from revenue first to get net sales, then subtract COGS. This gives you a net LTV that reflects real dollars you can reinvest.
For example, say your average customer places 5 orders over two years, spending $80 per order. That’s $400 in gross revenue. But if your average gross margin is 40%, the profit-based LTV is $160. That’s the number you should compare against your acquisition costs, not $400.
A Step-by-Step Calculation
You can calculate a simple historical LTV with data most ecommerce platforms already track. Here’s how to do it:
Step 1: Find your average order value (AOV). Take your total revenue over a set period and divide by the number of orders. If you did $500,000 in revenue across 10,000 orders last year, your AOV is $50.
Step 2: Find your average purchase frequency. Divide total orders by total unique customers. If those 10,000 orders came from 6,000 unique customers, your frequency is about 1.67 orders per year.
Step 3: Calculate average customer value per year. Multiply AOV by purchase frequency: $50 × 1.67 = $83.50 per customer per year.
Step 4: Estimate average customer lifespan. This is the trickiest input. One common approach: take 1 divided by your churn rate. If roughly 40% of your customers don’t return within a year, your estimated lifespan is 1 / 0.40 = 2.5 years.
Step 5: Multiply. $83.50 × 2.5 = $208.75. That’s your revenue-based LTV. To convert it to a margin-based LTV, multiply by your gross margin percentage. At a 45% margin, the profit-based LTV would be about $94.
Historical vs. Predictive LTV
The formula above gives you historical LTV. It uses real transaction data, involves simple math, and tells you exactly what past customers were worth. The downside is latency: to know your 12-month LTV, you literally have to wait 12 months. It also assumes the future looks like the past, which breaks the moment you change your pricing, product mix, or marketing channels.
Predictive LTV takes a customer’s early behavior and projects their total value over a longer horizon, typically 12 or 24 months. The model looks at signals from the first days or weeks of the relationship: did the customer buy a $15 trial item or a $120 bundle? Did they purchase from a product category that historically leads to repeat orders? Did they arrive through a branded search (suggesting high intent) or a flash-sale ad (suggesting bargain hunting)?
Statistical models like BG/NBD predict whether a customer will buy again and when, while Gamma-Gamma models predict how much they’ll spend. A well-calibrated predictive model can reach roughly 60% accuracy by day 7 after a customer’s first purchase and above 80% accuracy by day 30. That speed matters because it lets you adjust ad budgets and targeting within weeks rather than waiting a full year to learn what worked.
For most small to midsize ecommerce stores, historical LTV is perfectly adequate. Predictive models become worth the investment once you’re spending heavily on acquisition and need faster feedback loops.
Using Cohort Analysis for Deeper Insight
A single average LTV can hide important differences between customer groups. Cohort analysis solves this by grouping customers based on when they first purchased (or another shared characteristic) and tracking their spending over time.
Start by grouping customers by their first purchase month. Then, for each cohort, track cumulative revenue per customer at 3, 6, 12, and 24 months. You’ll often find that customers acquired during a holiday sale behave very differently from those acquired through organic search in the spring. Holiday cohorts might have a higher first order value but lower repeat rates, while organic cohorts build value slowly but stick around longer.
You can also segment cohorts by the marketing channel that brought them in, the product category of their first purchase, or any coupon code they used. This lets you see which acquisition strategies produce the highest-value customers, not just the most customers. If your Facebook ad cohorts have an LTV of $75 and your email list cohorts have an LTV of $210, that changes how you allocate budget even if the Facebook ads generate more volume.
Applying LTV to Spending Decisions
The most common use for LTV is comparing it against your customer acquisition cost (CAC), which is your total marketing and sales spend divided by the number of new customers acquired. A widely cited benchmark is an LTV-to-CAC ratio of 3:1. At that ratio, you’re earning $3 in customer profit for every $1 you spend to acquire them, leaving room for overhead, reinvestment, and unexpected costs.
A ratio below 1:1 means you’re spending more to get a customer than they’ll ever return. A ratio between 1:1 and 3:1 can still be viable for fast-growing stores investing aggressively, but it leaves thin margins for error. A ratio significantly above 5:1 might actually signal that you’re under-spending on growth and leaving market share on the table.
Keep in mind that LTV is only as accurate as the inputs you feed it. Revisit your numbers quarterly. If your product mix shifts, your return rate climbs, or your repeat purchase rate changes, your LTV changes too. Treat it as a living metric rather than a number you calculate once and forget.

