How to Calculate Customer Lifetime Value (CLV) in Excel
By ExcelReady TeamUpdated 7 min read
The short answer
Customer lifetime value (CLV) is the profit you expect from one customer over the whole relationship. A simple Excel version is average order value × orders per customer per year × years as a customer × gross margin. Get the parts from your orders with SUMIFS, COUNTIFS and AVERAGEIFS. For subscriptions, use monthly revenue × margin ÷ monthly churn rate.
Key takeaways
- Simple CLV = average order value × purchase frequency × customer lifespan × gross margin.
- SUMIFS totals revenue per customer and COUNTIFS counts their orders, straight from an orders table.
- AVERAGEIFS compares order value or customer value by channel or segment.
- For subscriptions, CLV = monthly revenue per customer × margin ÷ monthly churn rate.
- Use profit (margin), not revenue, and keep every input in the same time period.
On this page+
Customer lifetime value (CLV) is the profit a business can expect from one customer over the whole time they buy from it. In Excel you can calculate customer lifetime value from a plain orders table: SUMIFS and COUNTIFS give each customer's revenue and orders, and a short formula turns them into CLV. This guide is for marketing, e-commerce and analyst roles, and builds everything on a small example checked in Python. The figures are examples, not benchmarks or advice for any business.
What customer lifetime value means#
CLV answers "what is a customer worth to us?". Teams compare it with the cost of winning a customer, decide how much to spend on marketing channels, and spot their most valuable segments. You'll meet two kinds:
- Historical CLV: what each customer has already spent. It needs only addition.
- Predictive CLV: what a typical customer will be worth over their whole relationship. It needs assumptions, such as how many years customers stay.
The simple predictive formula multiplies four parts:
CLV = average order value × orders per year × years as a customer × gross marginGross margin is the share of revenue left after the cost of the goods sold. Using it turns revenue into profit.
The example orders table#
The examples use seven orders from one year in A1:D8:
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Order | Customer | Channel | Revenue |
| 2 | 1001 | C-01 | Search | 120 |
| 3 | 1002 | C-02 | Social | 80 |
| 4 | 1003 | C-01 | Search | 95 |
| 5 | 1004 | C-03 | 150 | |
| 6 | 1005 | C-02 | Social | 60 |
| 7 | 1006 | C-01 | Search | 110 |
| 8 | 1007 | C-03 | 130 |
Each customer came through one channel. A real table would have thousands of rows, but the formulas are the same.
Step 1: Revenue and orders per customer#
List the customer IDs in F2:F4, then total and count each one's orders. In G2, revenue:
=SUMIFS($D$2:$D$8,$B$2:$B$8,F2)In H2, number of orders:
=COUNTIFS($B$2:$B$8,F2)Fill both down (Windows: Ctrl+D; Mac: ⌘D):
| Customer | Revenue | Orders |
|---|---|---|
| C-01 | 325 | 3 |
| C-02 | 140 | 2 |
| C-03 | 280 | 2 |
This is historical CLV in revenue terms: C-01 has spent 325. The $ signs lock the ranges, so only F2 changes as you fill down. The SUMIFS and COUNTIFS function guides explain the argument order. In Excel 2021 or Microsoft 365, =UNIQUE(B2:B8) in F2 lists the customer IDs for you.
Step 2: Calculate average order value and frequency#
Now work out the inputs to the CLV formula, with each one in its own cell:
| Input | Formula | Result |
|---|---|---|
| Total revenue | =SUM(D2:D8) | 745 |
| Number of orders | =COUNT(D2:D8) | 7 |
| Number of customers | =COUNTA(F2:F4) | 3 |
| Average order value | =745/7, as cell references | 106.43 |
| Orders per customer per year | =7/3, as cell references | 2.33 |
| Revenue per customer per year | AOV × orders per customer | 248.33 |
In your sheet, divide the cells rather than typing the numbers: if total revenue is in K2 and orders in K3, average order value is =K2/K3. Without a separate customer list, =SUMPRODUCT(1/COUNTIF(B2:B8,B2:B8)) counts the distinct customers in any version of Excel. The article on how SUMPRODUCT works explains why that trick counts each ID once.
Step 3: Turn the inputs into CLV#
Add two assumptions: how many years a typical customer stays (3 in this example) and your gross margin (40%). Then multiply:
=K4*K5*K6*K7where K4 is average order value, K5 orders per customer per year, K6 years as a customer and K7 gross margin. The result is 298.00: 248.33 of revenue per customer per year × 3 years × 40%. Excel uses the unrounded values, so the answer doesn't drift. In plain words, a typical customer in this example is worth about 298 of gross profit over three years.
Lifespan is the hardest input. If about a third of customers stop buying each year, a common estimate is 1 ÷ 0.33, roughly 3 years. Change the assumption cells and see how much CLV moves; that shows you which inputs matter most.
Compare CLV by channel with AVERAGEIFS#
AVERAGEIFS averages only the rows that meet your conditions, so it shows which channels bring the most valuable customers. Average order value by channel:
=AVERAGEIFS($D$2:$D$8,$C$2:$C$8,"Search")| Channel | Average order value | Revenue per customer |
|---|---|---|
| Search | 108.33 | 325 |
| Social | 70.00 | 140 |
| 140.00 | 280 |
For revenue per customer by channel, add a Channel column (I) to your per-customer table and use =AVERAGEIFS($G$2:$G$4,$I$2:$I$4,"Email"). Here Search customers order most often, while Email customers place the biggest orders. With only one customer per channel this proves nothing, but on real data it is how teams compare channels. The AVERAGEIFS function guide and AVERAGEIFS with multiple criteria cover more conditions, and averaging by group shows a pivot table alternative.
CLV for subscription businesses#
For a subscription, customers pay a similar amount every month, and the key unknown is how long they stay. Churn rate is the share of customers who cancel each period. A widely used formula is:
CLV = average monthly revenue per customer × gross margin ÷ monthly churn rateWith example figures of 30 a month, a 70% margin and 4% monthly churn, the formula =30*70%/4% returns 525. Dividing by churn is the same as multiplying by the average lifetime: 1 ÷ 4% = 25 months.
Common CLV mistakes#
These slips make CLV look bigger or smaller than it is:
- Using revenue instead of profit. Multiply by gross margin before comparing CLV with acquisition costs.
- Mixing time periods. Orders per year needs lifespan in years; monthly churn needs monthly revenue.
- Counting orders instead of customers. Divide by the number of distinct customers, not the number of rows.
- Short data windows. Customers who joined last month haven't had time to buy again, which pulls frequency down.
- Treating one average as the truth. Segment by channel or cohort, because a few big customers can skew the average.
CLV is a common topic in Excel skills for e-commerce and Excel skills for marketing jobs, along with conversion rates and campaign totals.
Practise it#
Try the exercise on this page: one SUMIFS gives a customer's historical value. Then practise COUNTIFS and SUMIFS in a live spreadsheet to build the per-customer table, and practise AVERAGEIF, MAXIFS and MINIFS to compare segments. Each lesson checks your formula instantly.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Find the historical value of customer C-01. Click G2 and use SUMIFS to add the revenue in D2:D8 where the customer in B2:B8 is "C-01". Press Enter.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Revenue | |||||||
| 2 | C-01 revenue | |||||||
| 3 | ||||||||
| 4 | ||||||||
| 5 | ||||||||
| 6 | ||||||||
| 7 | ||||||||
| 8 | ||||||||
| 9 | ||||||||
| 10 | ||||||||
| 11 |
Tip: SUMIFS starts with the range to add (D2:D8), then the range to check (B2:B8) and the customer ID in quotes.
Practise this in a lesson
Frequently asked questions
What is the formula for customer lifetime value?
A simple version is average order value × purchase frequency × customer lifespan × gross margin. For subscriptions, a common version is average monthly revenue per customer × gross margin ÷ monthly churn rate.
How do I calculate total revenue per customer in Excel?
Use SUMIFS with the customer ID as the condition, for example =SUMIFS($D$2:$D$8,$B$2:$B$8,F2). Lock the ranges with $ and fill the formula down a list of customer IDs.
What is the difference between historical and predictive CLV?
Historical CLV adds up what each customer has already spent. Predictive CLV estimates future value using assumptions such as how long customers stay. The formulas in this guide cover both, but the predictive version is only as good as its assumptions.
Should CLV use revenue or profit?
Profit is better. Multiply revenue by your gross margin so CLV can be compared with what it costs to win a customer. Revenue-based CLV makes customers look more valuable than they are.