How to Calculate Customer Lifetime Value (LTV) in Shopify

Unlock the power of customer lifetime value in Shopify: Learn how to calculate LTV, identify high-value customers, and drive strategic e-commerce growth.

Alex JostAlex Jost
Founder of RetentionX · Oct 23, 2025 · 18-minute read

CLV vs. LTV in E-commerce: In the realm of e-commerce, understanding the long-term value of a customer is essential. This value is often referred to as "Customer Lifetime Value", capturing the total worth of a customer to a business over the entirety of their relationship. Two abbreviations have emerged to represent this concept: CLV (Customer Lifetime Value) and LTV (Lifetime Value). Regardless of the abbreviation, the underlying concept remains the same.

Key takeaways
1
Customer lifetime value (LTV) in Shopify is the profit a customer contributes over a defined period: net revenue minus cost of goods, not just what they spent.
2
Always attach a time window. "LTV365 is $250" can be compared across customers and cohorts; "our LTV is $250" can't.
3
Per customer: LTV = Σ net revenue − Σ COGS within the window. Net revenue is after discounts, returns and taxes.
4
Shopify doesn't give you a reliable LTV out of the box, but an order export plus cost per item is enough to calculate it.
5
Don't set CAC targets from your oldest cohorts. They're usually your most loyal customers, and new cohorts rarely reach their numbers.
In this post
01What is LTV?→
02The LTV formula→
03Shopify LTV formulas compared→
04How to calculate LTV in Shopify, step by step→
05The ideal LTV:CAC ratio→
06FAQ→
Part 1 · The basics

What is LTV?

❝

LTV, or Lifetime Value of a customer, represents the total profit a business can expect from a single customer throughout their lifetime of interactions with the brand. It’s a projection of the future net profit attributed to the entire relationship with a customer.

Calculating the Customer Lifetime Value (LTV) not only detects the customers that are actually costing you money but also helps you determine which existing customers have the highest return on investment and what their common characteristics are.

Why is LTV important for brands on Shopify?

  • Predictive Tool: LTV allows companies to understand how much they should be willing to spend to acquire a new customer.

  • Business Growth: Knowing the Shopify customer lifetime value helps in budgeting, marketing, and understanding customer behavior.

  • Customer Segmentation: By segmenting customers based on their LTV, companies can craft personalized strategies to retain valuable customers and improve the value of lower-value segments.

– Shopify does not provide a reliable Customer Lifetime Value (LTV) metric out of the box

The LTV Formula: Calculate Shopify Customer Lifetime Value

In eCommerce, Customer Lifetime Value is the value that a customer spends with your company over their entire lifetime. Essentially, it is the amount of money that they will spend on your products after expenses.

Most tools and Shopify apps you can find neglect this factor and calculate customer lifetime value only as the sum of the sales over the average customer lifespan. But what do you gain from a customer who orders a lot, but sends everything back or only buys in sales at high discounts?

Another problem with this is that the average customer lifespan is constantly changing as you increase the number of new customers, who naturally have a shorter lifespan and may behave differently to older cohorts.

RetentionX recommends following customer lifetime value formula:

LTV = (Average Order Value x Average Purchase Frequency) x GrossMargin

– within a certain time period.

But why is it important to consider the fixed time period? Quite simply, because otherwise you are comparing apples with pears. Customers you acquired 2 years ago had much longer time to build up high LTV values compared to new customers from the current month. To create fair conditions, you need to look at a period that all customers you base the calculation on have fulfilled. For example, LTV365, which measures the LTV of all customers who have been customers for a year from the time of the initial purchase to the 365th day after that purchase.

Brands are often asked "What's your LTV?". This easy sounding question should never be answered with just a single number. LTV is time-dependent! Because there's an inherent time component to the calculation and its tendency to evolve over time, context is key. A correct answer to this question would be something like, "After the first year, the average LTV of our customers is $250".

Why? Let's take the example of Anna and Michael. If we compare the LTVs of both customers, we would quickly agree that Michael is the more valuable customer with an LTV of $1,261 compared to Anna's LTV of $893.

But with this comparison, we miss the context! By assessing their current LTV, we miss factors such as purchase frequency and customer lifetime.

If we compare the first order dates, we would see that Anna placed her first order only 3 months ago, while Michael became a customer 8 months ago. So it might be quite unfair to compare them, as Michael simply had more time to place more orders and thus generate a higher LTV. To solve this problem, it is important to make the data comparable by always looking at the same time frame. For example, if we compare the first 90 days of both customers, we see that Michael had an LTV of $427, while Anna already had an LTV of $893. So even though Anna's current LTV is lower than Michael's, she should be considered a high-value customer.

The same logic should be applied to your overall LTV. By simply averaging all of your customers' individual LTVs, you would be giving the LTVs of new customers the same weight as those of loyal customers, which would likely lower your overall number – especially during scaling periods when you're acquiring a high volume of new customers. Default time frames used by consumer brands to measure LTV are 1, 3, 12, 24 and 60 months. RetentionX provides these exact breakdowns of LTV:

  • LTV 30 Days

  • LTV 90 Days

  • LTV 1 Year

  • LTV 2 Years

  • LTV 5 Years

So, since you have to look at each customer individually, the above formula is not really applicable. To calculate customer lifetime value of each Shopify customer, we recommend the following formula:

LTV= ∑ Net revenue - ∑ COGS – in the given time period.

  • ∑ Net revenue: Sum of all revenues after discounts, returns and taxes.

  • ∑ COGS: All costs associated with these sales including purchase and production price of the items.

This will result in the real profit contribution of each individual customer.

Part 2 · The guide

Shopify LTV formulas compared: which one to use

Most Shopify LTV numbers come from one of four formulas. They give very different answers for the same customer, and only the last two account for what a customer actually costs you.

Shopify LTV formulas compared
Only a time-bound, margin-based LTV compares customers fairly.
Four common ways to put a lifetime value on a Shopify customer, and what each one gets wrong.
MethodFormulaVerdict
Shopify "Amount spent"Total the customer has spent to dateNo time window, no costs. Older customers always look better.
Classic LTVAOV × purchase frequency × customer lifespanLifespan shifts as you add new customers; ignores margin and returns.
Margin LTV, fixed window(AOV × purchase frequency) × gross margin, within a set periodGood store-level estimate.
Per-customer LTV365Σ net revenue − Σ COGS in each customer's first 365 daysBest: fair across cohorts and shows real profit contribution.
Pick the window (90 days, 1 year, 2 years) and always say it with the number.

For a quick store-level estimate, the margin formula above is fine. To compare customers, cohorts, channels or first products, calculate LTV per customer over the same window and average it only across customers who have completed that window.

Worked example: LTV365 for one customer

Here is the per-customer formula with round, illustrative numbers. The customer placed five orders, but the fifth one falls outside their first 365 days, so it doesn’t count toward LTV365.

LTV365 worked example
$380 in net revenue, $228 in LTV365.
One illustrative customer, first order on day 0. Only orders within 365 days count.
OrderDayNet revenueCOGSProfit
10$95$38$57
241$110$44$66
3150$80$32$48
4290$95$38$57
5400Excluded––
LTV365$380$152$228
Net revenue is after discounts, returns and taxes (order 3: $120 minus a $40 return). COGS uses each variant's cost per item.

LTV365 = $380 net revenue − $152 COGS = $228. Calculated this way, a customer acquired last month and a customer acquired two years ago are measured on exactly the same terms.

Part 3 · Do it yourself

How to calculate customer lifetime value in Shopify, step by step

Shopify won’t hand you this number, but an order export and a spreadsheet are enough to build it.

In Shopify · 7 steps
1
Fill in cost per item
On every product variant, so COGS can be calculated. Missing? Use category gross margin as a stopgap.
2
Export your orders
From Shopify admin with line items: customer, date, subtotal, discounts, refunds, taxes, shipping, SKU, quantity.
3
Find first order dates
Keep only customers whose first order is at least as old as the window (365 days for LTV365).
4
Sum net revenue
Per customer, inside the window: subtotal minus discounts and refunds, no taxes or shipping.
5
Sum COGS
Per customer: quantity × cost per item, minus units returned and restocked.
6
LTV = net revenue − COGS
Average across eligible customers to get the store’s LTV365.
7
Split and compare with CAC
By first-order month, channel, first product and discount code.

Grouping by first-order month turns this into an LTV cohort report; Customer Cohorts shows how to read one. If you’d rather not rebuild it every month, RetentionX calculates it per customer automatically (see below).

Common Shopify LTV mistakes

MistakeDo this instead
Using “Amount spent” as LTVUse a fixed window and subtract costs: “Amount spent” rewards tenure, not value.
Averaging every customer regardless of tenureOnly average customers old enough for the window; new ones drag it down during growth.
Counting revenue instead of contributionSubtract discounts, returns and COGS: that’s where heavy buyers turn out to be unprofitable.
Setting CAC targets from your oldest cohortsRead how much of your CAC is just maintenance before raising bids on an LTV new customers won’t reach.
Treating LTV as fixedIt’s a lever: Ways to Increase LTV and The LTV Playbook cover how to move it.

Where to Find the LTV in RetentionX

In the first step RetentionX calculates the LTV per customer. Under each customer profile you'll find the LTV per customer and if applicable the LTV breakdown after 1, 3, 12, 24 and 60 months.

Using individual records, RetentionX calculates the average LTV for your entire customer base. The Daily LTV report, shows a breakdown of the average LTV that includes all customers who have completed the lifetime under consideration, e.g. 1 year. This report allows you to answer our starting question of what your LTV is, but time-dependent. As this value evolves over time with changes in customer quality, the report illustrates the development of the LTV since you started using RetentionX. More details about this report can be found here.

The Predictive LTV for Shopify

But what if I don't want to wait a year to find out the LTV values of the Shopify customers I currently acquire? RetentionX has a solution for this as well: LTV predictions. With the help of the Prediction add-on RetentionX is able to assign an LTV value for all time periods to the customer already at the time of acquisition. There's no need for an average customer lifespan anymore.

Prediction is performed via machine learning and searches data twins based on the following criteria:

  • Purchase Frequency

  • Product Preferences

  • Average Order Value

  • Return Behavior

  • Order Quantity

  • Demographics

  • Average Customer Lifespan

  • Average Purchase Frequency

LTV Cohorts for Shopify

The first step to dig deeper into the causes of your shopify customers' LTV is to look at the LTV cohort analysis.

Cohorts group customers by criteria. The default use case is to group existing customers into cohorts based on the month of their initial purchase. This allows you to analyze how customer quality has evolved in their average customer lifespan.

It is important to monitor the customer lifetime value constantly. Many brands make the serious mistake of making assumptions about LTV based only on the oldest cohorts - their oldest customers. However, these are usually the most loyal by nature, as many are not acquired through performance marketing campaigns but consist of friends, acquaintances, employees and other overperforming segments. Since these also have the longest history, this data quickly distorts the overall picture.

The whole thing becomes problematic as soon as you combine the assumptions from old loyal cohorts with the growth from current new customer acquisition in order to justify high CACs (customer acquisition costs). However, since customer quality usually deteriorates significantly as a result of scaling, these customers will never reach the reference LTV values.

We have seen many brands get into trouble because of this misjudgement and have sunk millions into unprofitable marketing.

This analysis is also performed automatically for you in RetentionX.

The ideal LTV:CAC ratio

Success hinges on a balance between acquiring new customers and maximizing their value over time. One key metric that plays a pivotal role in understanding this balance is the Customer Lifetime Value to Customer Acquisition Cost ratio (LTV:CAC). This ratio serves as a powerful tool for evaluating the efficiency and sustainability of a DTC ecommerce brand's growth strategy.

Understanding the Formula:The LTV:CAC ratio compares the value a customer brings to your business throughout their lifetime to the cost incurred in acquiring that customer. The formula for calculating this ratio is relatively straightforward:

LTV:CAC Ratio = Customer Lifetime Value (LTV) / Customer Acquisition Cost (CAC)

Where:

  • Customer Lifetime Value (LTV) is the projected revenue a customer generates during the average customer lifespan. It takes into account factors like purchase frequency, average order value (average purchase value), and customer retention rate as well as costs.

  • Customer Acquisition Cost (CAC) represents the expenses associated with acquiring a new customer. This includes marketing costs, advertising expenses, and any other investments aimed at bringing in new clientele.

Interpreting the Ratio:

The LTV:CAC ratio offers a clear insight into the health of a DTC ecommerce business's customer acquisition costs and retention strategy. Here's how to interpret different scenarios based on the ratio value:

  • Ratio < 1.0: If the ratio is less than 1.0, it indicates that the cost of acquiring customers outweighs the value they bring over their lifetime. This could be a sign that the brand needs to reevaluate its acquisition channels, optimize marketing strategies, or focus on improving customer retention.

  • Ratio = 1.0: A ratio of 1.0 suggests that the lifetime value of a customer is equal to the customer acquisition costs. While this may seem balanced, it's generally not enough to sustain long-term growth. Brands should aim for a ratio higher than 1.0 to ensure profitability and scalability.

  • Ratio > 1.0: A ratio greater than 1.0 signifies that the customer's lifetime value is higher than the cost of acquisition. This is a positive indication that the brand is efficiently acquiring and retaining customers, which can contribute to sustainable growth and profitability.

LTV:CAC Benchmarks and Industry Variations

The ideal LTV:CAC ratio can vary across industries and business models. However, many successful DTC ecommerce brands strive for a ratio of at least 3:1, meaning that the customer lifetime value is three times greater than the cost of acquiring them. This allows the brand ample room for reinvestment, innovation, and scalability.

It's important to note that LTV and CAC can differ significantly based on factors like the average order value, retention rate, and the competitive landscape within the industry. Regularly tracking and analyzing these metrics, along with the LTV:CAC ratio, can provide insights into the effectiveness of marketing campaigns, customer engagement strategies, and overall business health.

How to make LTV actionable

We have just briefly touched on how important LTV is for measuring marketing performance. It quickly becomes clear that it would be interesting to analyze the LTV of each individual marketing channel and campaign and to identify which marketing measure also brings the best customers. But this is only one of many interesting LTV dimensions for brands on Shopify.

LTV by Marketing Channel & Campaign

Evaluating campaigns based only on short-term metrics like click-through rates or initial conversion rates can be misleading. LTV provides a long-term perspective, ensuring that campaigns aren't prematurely judged as successful or unsuccessful based on initial results alone. LTV offers a holistic, long-term view.

By analyzing LTV across all marketing efforts, brands can make more informed decisions, maximize their marketing ROI, and build lasting relationships with high-value customers.

  • Optimized ROI (Return on Investment):By understanding the LTV of customers from different channels and campaigns, you can measure the long-term return on your marketing investments. Some channels may be more expensive in terms of acquisition costs but could bring in customers with a higher LTV, making the higher costs justified.

  • Effective Budget Allocation: Knowing the LTV by channel allows you to allocate your marketing budget more effectively. Channels and campaigns with higher LTV can be allocated a larger share of the budget, while underperforming channels might require re-evaluation or optimization.

It’s always easier to retain a good customer than to try to reactivate a bad one. Target customers who actually have the potential to develop high customer lifetime value.

LTV by Product

The product a customer chooses as their first purchase can be a significant indicator of their future behavior and value to the company.

By analyzing LTV through this lens, brands can make more strategic decisions across various facets, from marketing to inventory management.

  • Product Value Identification: Not all products have the same impact on customer retention and spending behavior. Some "gateway" products might attract loyal, high-spending customers, while others might attract one-time buyers. By understanding the LTV of customers based on their initial purchase, you can identify which products serve as better long-term value drivers.

  • Toxic Bestsellers: Marketing channels such as Meta (Facebook, Instagram), TikTok or even GoogleAds tend to promote only one or a few products, because these products acquire customers for the lowest price, but completely disregard the LTV. As a result, you often have hidden champions in your shopify product portfolio that hardly get any attention. These supposed bestsellers are even often rather bad products, as they have low price points and thus attract customers for whom your other products are too expensive in comparison. In this way, you ruin your customer retention already in the customer acquisition phase.

  • Inventory and Supply Chain Management: Products that lead to higher LTV might be given priority in inventory decisions, ensuring they are always in stock.

LTV by Product Category

Analyzing the LTV by the specific category of products a customer purchases during their initial interaction offers a broader perspective than looking at individual products. Understanding this category-based LTV has various strategic implications:

  • Category Insights & Trends: Understanding LTV at a category level helps identify which categories serve as primary drivers of long-term customer value. This can reveal overarching trends about customer preferences, behaviors, and brand affinity.

  • Bundling and Cross-Selling: If certain categories tend to produce more valuable customers, products within these categories can be bundled or cross-sold with products from other categories, amplifying sales and customer value.

  • Product Development & Expansion: High LTV categories can provide insights into where to expand or refine a brand's product range. New products developed within these categories might benefit from an existing loyal customer base.

  • Merchandising and Store Layout: In physical or online stores, high-LTV generating categories can be placed in prime locations, such as the storefront or the homepage, to attract and convert more first-time buyers.

LTV by Demographics

Analyzing the LTV by customer demographics, such as gender and location (both city and country), can offer valuable insights into the behavior and preferences of different segments of your customer base. Let's delve into the importance of such an analysis:

  • LTV by Location: If you find that the LTV of your existing customers from certain cities is significantly higher than in others, you can also adjust your marketing budgets accordingly. Sometimes there are differences of 300%. We have analyzed why this is and found that there is a strong correlation between the purchasing power of certain cities and zip codes and the LTV of their customers. So it makes sense to adjust bids according to the LTV of the city. If you also have local stores, it also makes sense to analyze where many of your loyal customers already come from in order to determine the location of new stores accordingly.

  • LTV by Gender: We found similar findings regarding gender distribution. Shopify itself does not provide information about the gender of your customers. However, RetentionX enriches this information and allows you to determine the LTV based on gender as well. Again, it makes sense to adjust the marketing strategy as well as the product portfolio accordingly as soon as you recognize significant differences between the behavior of men and women.

LTV by Discount Code

Analyzing the Lifetime Value (LTV) of customers based on the specific coupon codes they use provides actionable insights into the effectiveness of different promotional strategies. Here's why such an analysis is important:

  • Evaluate Promotional Campaigns: If you've issued multiple coupon codes through various marketing campaigns, understanding the LTV of the customers associated with each code helps determine which campaigns are attracting not just short-term buyers but long-term, high-value customers.

  • Tailor Future Promotions: By knowing which coupon codes lead to high LTV, you can craft similar future promotions to attract similar high-value customers.

Final Tips on using LTV on Shopify

  • Integrate with CRM, e-mail Marketing & Loyalty Programs: RetentionX integrates with all major Customer Relationship Management (CRM), Customer Service systems and e-mail marketing tools (Klaviyo, Mailchimp,...). This allows for individual service levels, improved targeting and profit-driven loyalty programs.

  • Create Powerful Audiences: With the help of RetentionX's powerful marketing automations, it's easy to transfer lookalike audiences of your best customers to your marketing channels after LTV. Create audiences in tiktok, meta ads, google ads or pinterest at the push of a button

  • When trying to maximize return on investment and spur long-term growth, it is beneficial for businesses to focus their marketing strategies towards most valuable customers. By taking this approach, resources can be managed more efficiently with an emphasis being placed on customer segments of greater customer lifetime value (LTV).

Conclusion

LTV is a powerful metric for DTC brands on Shopify. It provides insights into customer behavior, guides resource allocation, and informs marketing strategies. By understanding and acting on LTV, DTC brands can drive growth and profitability.

Using RetentionX, you can effortlessly manage customer lifetime value (LTV) and improve your store’s performance. With these resources at hand, tracking, assessing and optimizing customer lifetime value is more convenient than ever before.

Frequently Asked Questions

How do I calculate LTV in Shopify?
The quick version multiplies Average Order Value (AOV), Average Purchase Frequency (APF) and Average Customer Lifespan. For a number you can act on, use a fixed window and margin instead: for each customer, sum net revenue minus COGS over their first 365 days (LTV365), then average across customers who have been with you for at least 365 days.
What is a good LTV for ecommerce?
For e-commerce, an ideal LTV:CAC ratio should be 3 to 1. This signifies that for every single customer acquired, a company should generate three times the amount of expenditure used in acquisition.
What strategies can I implement to boost LTV in my Shopify store?
For increased lifetime value (LTV) of high-value customers, create personalised experiences with them, implement loyalty schemes and offer top notch post purchase assistance. Optimise marketing activities for those valued buyers.
What Shopify apps can help me track and manage LTV?
RetentionX, Lifetimely and Peel - Shopify apps for tracking customers’ LTV - can help you gain a better understanding of customer behavior with their high-value patrons. Using these tools makes it possible to optimize your marketing strategies in order to maximize the benefit from this group of clients.
How can I segment my customers for effective LTV analysis?
Grouping customers according to their recency, frequency and monetary value of purchase through RFM analysis will help you target those with high potential for LTV gain in your marketing efforts. This enables you to better allocate resources towards the most valuable consumers based on their spending habits.
Does Shopify calculate customer lifetime value?
Not reliably. Shopify shows how much each customer has spent in total, but that figure has no time window and ignores discounts, returns and cost of goods, so long-standing customers always look more valuable. To get a usable LTV, export orders with line items, add cost per item, and calculate net revenue minus COGS per customer over a fixed window.
What is LTV365?
LTV365 is a customer’s lifetime value measured over their first 365 days: net revenue minus cost of goods from every order placed within a year of the first order. Because every customer gets the same window, LTV365 lets you compare customers, cohorts and channels fairly, regardless of when they were acquired. The same logic works for 90-day or two-year windows.