How to calculate CLV for ecommerce startups

Customer lifetime value (CLV) — or customer profitability, customer profitability analysis, or simply “figuring out who makes you the most money” — is an essential metric that can help you optimize your business to ensure that you’re making the most money while wasting the least amount of time and resources possible.

CLV simply calculates the net profit attributed to your relationships with customers. It is a common consideration within large corporations that is often underutilized, and tends to be given no consideration in small businesses and startups.

Why should I care?

A straightforward example of the relevance of CLV is to examine customer acquisition in an ecommerce company. When acquiring customers through digital channels like Google AdWords, Facebook Ads or YouTube Ads, the most basic, common sense approach to optimizing your spending would be to invest more where it is cheaper to acquire new customers. A scenario for example:

Channel Total spend New customers Customer acquisition cost
Google AdWords $100 100 $1
Facebook Ads $100 50 $2
YouTube Ads $100 10 $10

Based on simple analysis, it appears obvious that it would be wisest to spend money on Google AdWords because that is where new customers can be acquired with the least amount of money.

But, if we also consider CLV in context, the equation changes:

Channel Total spend New customers Customer
acquisition cost
lifetime value
Revenue Profit
Google AdWords $100 100 $1 $10 $1,000 $900
Facebook Ads $100 50 $2 $15 $750 $650
YouTube Ads $100 10 $10 $150 $1,500 $1,400

With additional data, it’s clear that the initially “obvious” answer, considering only customer acquisition cost (CAC), would not have lead to the most ideal decision. For the same $100, you would ultimately make $500 more by initially spending more money on the expensive YouTube ads when CLV is factored in.

This example is a simplification of the concept but is representative of real-world scenarios. For any business that sells a product  to customers, understanding the short- and long-term costs and benefits in acquiring and maintaining client relationships is significantly important.

CACs and CLVs are not just pieces of information that are only relevant in retrospect; there are steps that can be taken to make better prospective decisions, and help determine who your best customers are and will be.

Calculate CLV

Many CLV formulas are based on getting the average CLV for all of your customers. This can be helpful, but it does nothing to tell you about the types of customers that you should be targeting and acquiring, and most formulas require 5+ years of data and knowledge about the customer life cycle to predict what the CLV is going to be with the highest degree of accuracy. However, there are methods that startups and small businesses can use to achieve the same goal. You need to determine the following for each of your current customers:

Information needed Typical source
How much has each customer paid you? Your online shopping system (Shopify, WooCommerce,
Magento, etc.)
Over what time frame did each customer pay you?
Margin/How much did it cost you to make the product
that the customer bought?
Cost of goods sold by SKU. Typically stored in spreadsheet
format based on manual calculations you will need to make.
You can also store this in your online shopping system.
How much did it cost you to acquire the customer? Depends on your acquisition strategy, sources include:
1. Facebook Ads
2. Google Ads
3. Purchasing email lists
4. Affiliate costs
You can start with spreadsheet exports from these systems.
Mapping tables to combine data. 1. Sales to costs – Your sales should have a SKU for each
product that was sold, which should link to a SKU that you
have in your cost of goods sold spreadsheet. This will
allow you to calculate a cost per order.
2. Sales to cost of acquisition – Each sale should have
sourcing data. You can acquire this in a variety of ways:
    a. UTM codes
    b. Discount codes
    c. Referral codes
Allocating the cost of acquisition to sales in a digital world
where cookies are only so reliable requires a good
attribution model, which would require a full article on its own
to define.
How much will the customer spend? (optional) We will discuss how this is calculated in more detail later in
this article.
How much of your fixed cost should this customer
In general, you should start by allocating an even distribution
of fixed cost towards each customer. Once you have a more
robust model, you can start to make additional differentiations
amongst customers, e.g:
1. Allocating customer service costs towards customers
       who use more customer service time.
2. Allocating product development costs against each
       product that is being sold.
    3. Allocated fixed marketing costs towards brand building
       for the product that it is the most relevant for.
    4. And more…

Once you have determined those variables, a general formula to calculate CLV is:

For example:

Imagine you own an ecommerce company that launched approximately three years ago. During this time, you’ve had a number of sales but you’re not sure how the underlying metrics look, so you want to determine your CLV. Here’s how to go about doing so in a spreadsheet. For purposes of this exercise, we will use Shopify as a data source:

  1. Transactions & line items: Export a full list of transactions and line items from Shopify, and place this into one tab. Make sure that email addresses are included.
  2. Customers (with source): For each email address, you should have an attributed source. In early days, this can be done manually. Once your orders grow, you need an attribution algorithm to determine the source of each of your customers. 

Then you’ll have the data needed to determine CLV to date, and see what areas are working best for your company.

The categorized information should provide the following example data:

Source Total revenue # of customers Customer LTV Cost of campaign Customer CAC Customer Revenue Cost of goods sold Customer profit
Friends & family $5,742.00 39 $147.23 $147.23 $25.00 $122.23
Online forum post $1,782.00 11 $162.00 $25.00 $2.27 $159.73 $25.00 $134.73
Event 1 $396.00 4 $99.00 $1,000.00 $250.00 $(151.00) $25.00 $(176.00)
Event 2 $792.00 4 $198.00 $198.00 $25.00 $173.00
Blog referral $3,663.00 18 $203.50 $200.00 $11.11 $192.39 $25.00 $167.39
Walk-in $990.00 6 $165.00 $250.00 $41.67 $123.33 $25.00 $98.33
Organic search $2,673.00 8 $334.13 $2,000.00 $250.00 $84.13 $25.00 $59.13

The goal is to be able to segment your customers and identify which are the most valuable:

Source: Anaplan

The chart above demonstrates that not all types of customers are equal. Frequently, it is not the customers that account for the majority of revenue that generate most of the profit because of high costs incurred. At the other extreme of the spectrum are the small, infrequent customers that never purchase enough to cover the cost of acquisition and administering accounts. This graph is generated when net margins are plotted against customers according to their revenue size. It is critically important to understand the overall profitability of tranches of customers, and consider how they interact with your business, which relationships are the most beneficial, as well as how relationships can be more successfully (profitably) managed as a result.

In our example company (download an example spreadsheet template here), on a set marketing budget, we can see that certain customers aren’t worth the expense (e.g. those gained through events) and effort, and therefore should not be actively pursued. This is because, on average, they don’t spend as much, so we should attempt to find more customers online. This information allows us to direct our limited/fixed marketing budget wisely.


It may seem controversial, but all customers are not equal, and all potential customers are not equally worth your time or investment. Considering CLV will allow you to identify the customers that should be eradicated and which types you should seek.

You can further refine this by identifying CLV for each of the following segments:

  1. By the source of the customer
  2. By the customer’s location
  3. (B2B) By the size of the customer
  4. (B2C) By the customer’s wealth. There are a few ways to approximate this:
    1. By ZIP code
    2. By Bank Identification Number
  5. Etc… (The variables you could use to determine metrics are virtually unlimited).

Of course, how to actually get the data and specifics for CLV can vary from business to business depending on what you sell and how, how long customers are likely to remain, and how long you’ve been in business.


With many variables and the potential for great complexity, it’s most useful to start with the basics and begin with simple calculations around CLV. From there, you can adjust your decision making as your knowledge of your business and customers grows.

Once you’re doing this analysis consistently, it may become worth automating the process in order to reduce the amount of manual work required. Tools like Tableau and PowerBI can help with this, and Croud can also offer packages for dashboard automation. 

To learn more on CLV or to speak with our data solutions team, get in touch!

by Nicholas Hahn
2 February 2022



Related posts