Home » Ecommerce Analytics » Customer Lifetime Value

How to Calculate Customer Lifetime Value for Your Online Store

Customer lifetime value (CLV) is the total revenue a customer generates across every purchase they make from your store over the entire duration of your relationship. Knowing your CLV tells you exactly how much you can afford to spend acquiring a new customer, which marketing channels produce the most valuable customers, and whether your business is building sustainable value or burning through one-time buyers. A store with an average CLV of $400 and a customer acquisition cost of $50 has a completely different growth trajectory than a store with the same revenue but a CLV of $75 and an acquisition cost of $50.

Why CLV Changes How You Run Your Business

Most ecommerce store owners evaluate marketing campaigns based on first-purchase profitability. If it costs $30 to acquire a customer who places a $45 order with a $15 profit margin, the campaign appears to barely break even. Many store owners would pause or reduce spending on that campaign. But if that customer's CLV is $320, meaning they will place seven more orders over the next two years, that $30 acquisition cost actually represents a 10x return on investment. Without CLV data, you systematically underspend on customer acquisition and leave growth on the table.

CLV also reveals which customer segments deserve the most attention and investment. Your top 10% of customers by CLV typically generate 40% to 60% of your total revenue. Identifying who these customers are, how they found your store, what they purchased first, and how their buying pattern developed over time gives you a blueprint for acquiring more customers like them. If your highest-CLV customers overwhelmingly come from organic search, that tells you to invest more in content and SEO. If they tend to make their first purchase during a specific promotion, that tells you which campaign types attract long-term buyers versus discount hunters.

The relationship between CLV and customer acquisition cost (CAC) is the fundamental equation of ecommerce sustainability. A healthy CLV:CAC ratio is at least 3:1, meaning each customer generates at least 3 times more revenue than it cost to acquire them. Businesses with a ratio below 1:1 are losing money on every customer and will eventually run out of cash. Businesses with a ratio above 5:1 are likely underinvesting in growth and could scale faster by spending more on acquisition. Tracking CLV gives you the data to find the optimal balance between profitable growth and aggressive acquisition.

Before You Start

You need at least 12 months of order history to calculate a meaningful CLV. Stores with less history can calculate a projected CLV based on early purchase patterns, but the estimate becomes more accurate with more data. You need access to your ecommerce platform's order data, including customer identifiers (email address or customer ID), order dates, and order values. Shopify's customer reports, WooCommerce's order export, and most platforms' admin dashboards provide this data. You also need a spreadsheet application or analytics tool to run the calculations.

Step-by-Step Calculation

Step 1: Calculate your average order value (AOV).
Export your order data for the past 12 months. Divide total revenue by total number of orders. For example, if your store generated $480,000 from 6,400 orders, your AOV is $75. Use net revenue after returns and refunds, not gross revenue, because returned orders do not contribute to customer value. Most ecommerce platforms show AOV directly in their analytics dashboard, but verify it by cross-referencing with your order export to ensure it excludes test orders and refunded transactions.
Step 2: Calculate average purchase frequency.
Divide the total number of orders by the total number of unique customers over the same 12-month period. If 6,400 orders came from 4,200 unique customers, the average purchase frequency is 1.52 orders per year. This means the average customer ordered about 1.5 times during the year. Note that this average includes one-time buyers who pull the number down. Your repeat customers likely order 3 to 5 times per year, but the large number of single-purchase customers reduces the overall average. Calculate purchase frequency separately for repeat customers to understand their behavior.
Step 3: Calculate annual customer value.
Multiply AOV by purchase frequency. Using the examples above: $75 multiplied by 1.52 equals $114 in annual customer value. This is what the average customer spends per year at your store. This number by itself is useful for setting maximum customer acquisition cost targets: if your gross margin is 50%, the average customer generates $57 in annual gross profit, which sets an upper bound on what you should spend to acquire them if you only consider first-year returns.
Step 4: Estimate average customer lifespan.
Customer lifespan is the hardest component to measure because it requires years of data or a predictive model. The simplest approach uses the reciprocal of your churn rate: if 40% of customers do not purchase again within 12 months, your annual churn rate is 40%, and the estimated customer lifespan is 1 divided by 0.40, which equals 2.5 years. For a more precise estimate, analyze your cohort data. Look at customers who first purchased 24 or 36 months ago and calculate what percentage are still active (made a purchase in the last 12 months). If 30% of a 3-year-old cohort is still active, and the retention curve suggests another 15% will purchase again, your average lifespan is approximately 2 to 3 years.
Step 5: Calculate customer lifetime value.
Multiply annual customer value by average customer lifespan. Using the examples: $114 per year multiplied by 2.5 years equals $285 CLV. This means the average customer who purchases from your store will generate $285 in total revenue over their relationship with your business. With a 50% gross margin, that represents $142.50 in gross profit per customer, meaning you can theoretically spend up to $142.50 on acquisition and still break even, though a healthy business targets a CAC well below that maximum.
Step 6: Calculate CLV by acquisition channel and customer segment.
The store-wide average CLV is a starting point, but segmented CLV reveals actionable insights. Calculate CLV separately for customers acquired through Google Ads, organic search, email, social media, and referral. You may discover that organic search customers have a CLV of $380 while Facebook ad customers have a CLV of $190, which dramatically changes the acceptable CAC for each channel. Also calculate CLV by first product purchased, because customers who enter through your flagship product might retain better than those who enter through a discounted item. This segmentation is where CLV analysis becomes truly powerful for decision-making.

Predictive CLV Models

The historical method described above works well for established stores with 2 or more years of data, but it has a fundamental limitation: it only tells you what happened in the past. Predictive CLV models use purchase patterns from the first 30 to 90 days of a customer's history to estimate their future value, letting you make acquisition and retention decisions faster.

The most widely used predictive model in ecommerce is the BG/NBD model (Beta-Geometric/Negative Binomial Distribution), which predicts future purchase probability based on recency, frequency, and the time period observed. In practical terms, a customer who purchased 3 times in their first 60 days has a different predicted CLV than a customer who purchased once 60 days ago, even though both are technically "60-day customers." The BG/NBD model quantifies this difference using statistical distributions fitted to your historical customer data.

Tools like Lifetimely ($19+/month for Shopify), Klaviyo's predictive analytics (included in email plans), and Triple Whale ($100+/month) implement predictive CLV models automatically using your store's data. These tools calculate predicted CLV for each customer and update the prediction as new purchase behavior is observed. For stores spending significant amounts on paid acquisition, predictive CLV enables you to evaluate marketing channel quality within weeks rather than waiting years for the full customer lifecycle to play out.

Even without specialized tools, you can build a simple predictive proxy using your cohort data. If historical data shows that customers who place a second order within 30 days have a 3-year CLV that is 2.4 times higher than the store average, you can flag early repeat purchasers as high-value customers and allocate extra retention resources (exclusive offers, priority support, loyalty rewards) to keep them engaged. This segmentation approach captures most of the value of predictive CLV without requiring complex statistical models.

Using CLV to Set Your Marketing Budget

CLV directly answers the question "how much should I spend to acquire a customer?" The answer depends on your target CLV:CAC ratio and your gross margin. For a store with a $285 CLV and a 50% gross margin, the lifetime gross profit per customer is $142.50. To achieve a 3:1 CLV:CAC ratio on a gross profit basis, your maximum CAC should be $47.50. To achieve a 5:1 ratio (more conservative), your maximum CAC should be $28.50.

Apply this logic channel by channel using your segmented CLV data. If Google Ads customers have a CLV of $380 and organic search customers have a CLV of $285, you can afford to spend more acquiring Google Ads customers than the store-wide average would suggest. Conversely, if social media customers have a CLV of $150, your acceptable CAC for social media ads is proportionally lower. This segmented approach prevents you from over-spending on channels that produce low-value customers and under-spending on channels that produce high-value ones.

CLV also justifies investments in customer service, email automation, and retention programs that do not generate immediate revenue but increase the number and value of future purchases. A loyalty program that costs $5 per customer per year but increases average customer lifespan from 2.5 years to 3.5 years adds $114 in lifetime revenue per customer (one extra year at $114 annual value), producing a 23x return on the $5 annual investment. These calculations are only possible when you know your CLV.

Common CLV Calculation Mistakes

Using revenue instead of gross profit overstates CLV's usefulness for acquisition budgeting. A customer who generates $285 in revenue but only $142 in gross profit supports a much lower maximum CAC than $285 suggests. Always calculate CLV on both a revenue basis (for benchmarking) and a gross profit basis (for acquisition budget decisions).

Ignoring the time value of money inflates CLV for businesses with long customer lifespans. A dollar received three years from now is worth less than a dollar received today. For ecommerce businesses with customer lifespans under 3 years, this effect is small enough to ignore. For subscription businesses or stores with 5+ year customer lifespans, apply a discount rate of 8% to 12% per year to future revenue to get a more realistic present-value CLV.

Averaging CLV across all customers hides the insight. If your average CLV is $285 but your top 20% of customers have a CLV of $900 and your bottom 50% have a CLV of $75, the average tells you almost nothing useful. The valuable insight is that your business depends heavily on a small segment of high-value customers, and your strategy should focus on acquiring more of them and preventing them from churning. Always calculate CLV by segment alongside the overall average.