Customers and retention
How to calculate customer lifetime value in WooCommerce
To calculate customer lifetime value in WooCommerce, open WooCommerce › Customers and read average lifetime spend in the summary under the table. That's total spend divided by customers, a simple historical lifetime value. For a version you can plan with, multiply average order value by average orders per customer, then by your gross margin.
This guide explains the formulas, which customers to include, an SQL query for developers, and where the number misleads.
What is customer lifetime value?
Customer lifetime value (CLV or LTV) is how much a customer spends with you over the whole relationship. Store owners use it to answer one practical question: how much can I afford to spend to win a new customer?
There are two common ways to work it out:
| Method | Formula | Good for |
|---|---|---|
| Historical | Total spend ÷ number of customers | A quick, honest look back |
| Simple formula | Average order value × average orders per customer | Seeing which lever (basket size or frequency) to pull |
Both use revenue. To turn either into a profit figure, multiply by your gross margin. Say your average customer spends $186 over their lifetime and your gross margin is 45%: each customer is worth about $84 in gross profit, which is the ceiling on what you can spend to acquire one.
The free way: the Customers report summary
- Go to WooCommerce › Customers.
- Look at the summary beneath the table. It shows the customer count, average orders, average lifetime spend and average order value for the customers in the current view.
- Note average lifetime spend. That's your historical lifetime value.
You'll also see the two parts of the simple formula right there: average orders and average order value. Average order value × average orders gives roughly the same figure, split into frequency and basket size.
Make the number fairer with filters
The all-customer figure includes people who bought for the first time yesterday. They pull the average down, because they haven't had time to come back.
- Add the Registration date filter to look only at customers who registered more than a year ago. Their lifetime spend is closer to the real thing.
- Filter by Country or region to compare markets, for example if shipping costs make overseas customers worth less.
- Use Number of orders more than 1 to see what a repeat customer is worth compared with everyone.
The individual Total spend column also lets you sort customers from highest to lowest, which is covered in how to find your top customers.
One customer at a time
On an order's edit screen, the Customer history box (added with order attribution in WooCommerce 8.5) shows that customer's total orders, revenue and average order value. It's handy while you're looking at an order, but it isn't a report.
For developers: lifetime value in SQL
The Analytics table wc_order_stats has customer_id, date_created, status and net_total for every order, and works with HPOS or posts storage. This gives the historical average and the formula parts for customers whose first order was at least a year ago:
SELECT COUNT(*) AS customers,
ROUND(AVG(orders), 2) AS avg_orders,
ROUND(SUM(spend) / SUM(orders), 2) AS avg_order_value,
ROUND(AVG(spend), 2) AS avg_lifetime_net_sales
FROM (
SELECT customer_id,
COUNT(*) AS orders,
SUM(net_total) AS spend,
MIN(date_created) AS first_order
FROM wp_wc_order_stats
WHERE parent_id = 0
AND status IN ('wc-completed', 'wc-processing')
GROUP BY customer_id
HAVING first_order < NOW() - INTERVAL 1 YEAR
) per_customer;
net_total excludes tax and shipping. parent_id = 0 leaves out refund rows, so these figures are before refunds. Match the status list to the statuses your Analytics counts, and change wp_ if your prefix differs. Grouping by the month of the first order turns this into a cohort analysis, which shows whether newer customers are worth more or less than older ones.
Where lifetime value misleads
- Total spend isn't net sales. The Customers report's spend figure and your own net sales calculation may not match exactly, depending on refunds, tax and shipping. Pick one source and stick with it.
- Averages hide a long tail. A few big customers can lift the average far above what a typical customer spends. Look at the median too: in the CSV export, sort by Total spend and read the middle row.
- Duplicate guests. A guest who used two email addresses becomes two lower-value customers.
- The past isn't a promise. Historical lifetime value describes customers you already won. If your product range, prices or marketing have changed, new customers may behave differently.
What Askshelf can and can't tell you
Askshelf's customer retention lookup gives you the store-wide inputs for the simple formula: all-time average lifetime spend, average orders per customer and repeat purchase rate. These are counts and averages, never names or individual histories.
What's the average lifetime spend per customer, and how many orders is that?
Lifetime spend here is revenue, not profit. If Cost of Goods Sold is turned on, the profit lookup gives your gross margin, which you can multiply in for the rough profit version, though it only covers orders placed since costs were recorded. Askshelf can't work out lifetime value for an individual customer or a group of customers, and it doesn't do predictive or cohort versions. It can also count customers who placed at least N orders but have stopped buying. See how to find customers who stopped buying.
How to use lifetime value to set an acquisition budget
Lifetime value is most useful as a ceiling. If a customer brings in about $84 of gross profit over their lifetime, spending $84 to win them only breaks even, and you won't see that money back for months. Many store owners aim to spend well under the ceiling, so there's room for error and for the time it takes customers to reorder. Compare it with what a new customer actually costs you from ads or discounts, and you'll know whether a channel is worth growing.
How to raise lifetime value
- More orders per customer usually moves the number more than bigger baskets. Your repeat purchase rate is the metric to watch.
- Bigger baskets help too: bundles and free-shipping thresholds lift average order value.
- Keep your best customers. Losing one regular can cost as much as several new customers bring in.
For the rest of the customer metrics WooCommerce can show, see the WooCommerce customer analytics guide.
Common questions
Does WooCommerce calculate customer lifetime value?
Not as a named metric. The Customers report summary shows average lifetime spend for the customers in the current view, which is a simple historical lifetime value. There's no predictive lifetime value or cohort report in core WooCommerce.
Should lifetime value use revenue or profit?
Revenue is easier and is what WooCommerce gives you. Profit is more useful for deciding how much you can spend to win a customer. Multiply revenue-based lifetime value by your gross margin to get a rough profit version.
Why is my lifetime value lower than I expected?
Usually because recent customers haven't had time to buy again, or because guests who used different email addresses are counted as separate customers. Measure older customers on their own for a fairer number.
See how Askshelf handles this: Customer analytics for WooCommerce