How to Calculate Customer Lifetime Value (using Shopify)

Josh Wilson
4 min readSep 24, 2020


Working with eCommerce Ad agencies everyday, there’s one metric that stands out and is often difficult to calculate: Customer Lifetime Value.

Customer Lifetime Value (CLV) helps an eCommerce business understand how much revenue will be generated from each new customer over the lifetime of the relationship. CLV is important because it informs companies how much to spend on customer acquisition i.e. digital advertisements and social media. This calculation changes over time as a business grows and penetrates deeper into a market, and therefore, should be calculated on a regular basis. Let’s walk through an example step-by step of how to calculate Customer Lifetime Value using Shopify as our guide:

Step 1: Select a timeframe

Typically this analysis is either done over the last 12 months or the total length of your company. Select a timeframe that makes sense for your business.

Step 2: Average Order Value

Total Sales ÷ Total Orders = Average Order Value

Average order value is calculated by dividing total sales by the total number of purchases. In Shopify, navigate to Analytics > Dashboards and change the time frame to match your selection from Step 1.

Find the Total Sales widget and save that number. Next, find and save the number from the Total Orders widget (this will be used on future steps as well). Divide Total Sales by Total Orders to find your Average Order Value.

Step 3: Average Purchase Frequency

Total Orders ÷ Total Customers = Average Purchase Frequency

Next, calculate Average Purchase Frequency. This is done by dividing the total number of orders from Step 2 by the number of unique customers.

To find the number of unique customers, navigate to the Customers portal by using the navigation on the left-hand side of the screen where you will see a list of “50 of X customers”. If you are doing analysis for the total lifetime of your company, that X is the total number of unique customers. If you’re doing analysis over a different timeframe, we will need to filter down to the customers who have made a purchase over that timeframe (such as 12 months).

  1. Click on “More Filters”
  2. Change “Date of Order” to match your timeframe
  3. The list will shorten to match your timeframe, store the X from “50 of X customers” as your number of unique customers.

It is possible that your customers may have purchased with different email addresses resulting in duplicate data, although this should be minimal. Divide total number of orders by number of unique customers to get your Average Purchase Frequency.

Step 4: Average Customer Value

Average Order Value x Average Purchase Frequency = Average Customer Value

Take Average Order Value (from Step 2) and Average Purchase Frequency (from Step 3) and multiply those two numbers together to calculate Average Customer Value.

Step 5: Average Customer Lifespan

Average Customer Lifespan can be difficult to calculate. If your business has been around for more than 3 years, I‘d recommend viewing this blog post to explain how to calculate average customer lifespan in Shopify. If your company is younger than 3 years, it is industry standard to use 3 years as your Average Customer Lifespan.

*Remember to convert this number to years

Step 6: Customer Lifetime Value

Average Customer Value x Average Customer Lifespan=Customer Lifetime Value

Multiply Average Customer Value (from Step 4) with Average Customer Lifespan (from Step 5) to find Customer Lifetime Value.

You’ve done it!

Conclusion: How do I use it?

Okay….that’s great….now what do I do with that?

Customer Lifetime Value is used to determine the performance of your customer acquisition efforts, such as Advertising. You should compare Customer Lifetime Value (CLV) with your Customer Acquisition Cost (CAC) to understand the performance of your customer acquisition, and whether you should invest more or less money into customer acquisition.

For example, if your CLV is $250, and your CAC is $50, you should consider investing more free capital into customer acquisition, as you will, on average, 5x your investment. Comparatively, if your CLV is $100 and your CAC is $150, you should consider adjusting the way you’re investing in acquiring new customers in order to flip the ratio in your favor.

Happy hunting!

Josh Wilson is the Founder and CEO of Luz. Luz is a technology-first approach to automate, aggregate, and analyze eCommerce data.