HomeLearnShopify

How to calculate Shopify customer lifetime value (LTV)

Formula, cohort segmentation, and how to calculate LTV from your Shopify order data

What it is

Customer lifetime value (LTV or CLV) is the total net revenue a single customer generates across all their orders with your Shopify store. It is one of the most important metrics in eCommerce because it determines how much you can profitably spend to acquire a new customer (your maximum CAC) and which customer segments are most valuable to retain. LTV is typically calculated over a fixed window (90-day, 12-month, or lifetime) to allow meaningful comparison.

Customer LTV Formula

Formula
LTV = Average Order Value × Average Purchase Frequency × Average Customer Lifespan
For SQL-based calculation on raw Shopify data: LTV per customer = SUM(order_total) per customer_id, filtered to paid orders and excluding refunded amounts. For predictive LTV, multiply 90-day revenue per cohort by the expected number of 90-day periods in the customer lifespan.

Why it matters

LTV is the foundation of profitable acquisition strategy. If your average customer LTV is $180 over 12 months, you can profitably spend up to that amount to acquire each customer (assuming acceptable margin). Knowing LTV by acquisition channel — paid social, organic, email — tells you which channels are bringing in your most valuable customers, not just your most customers. LTV segmented by first product purchased also reveals which products act as the best entry points into repeat purchasing behaviour.

How most teams track this today

Shopify's built-in analytics shows a basic average order value and some customer retention metrics, but does not provide per-customer LTV, LTV by cohort, or LTV by acquisition channel without a third-party app. Most DTC brands calculate LTV by exporting order data to a spreadsheet or using a BI tool.

Calculate this automatically with Taptic Data
Connect your Shopify account and Taptic generates this calculation from plain English against your actual data — no Excel exports, no manual joins. The SQL runs against your real schema, your real tables, your real numbers.

Common questions

What is a good LTV for a Shopify store?
It varies significantly by industry and AOV. A useful benchmark is the LTV:CAC ratio — LTV should be at least 3× your customer acquisition cost. For most DTC brands, a 12-month LTV of $150–$300 is healthy. Subscription businesses typically see much higher LTV due to predictable repeat revenue.
How is LTV different from AOV?
Average order value (AOV) is the average revenue per transaction. LTV accounts for how many transactions a customer makes over time. A customer with a $40 AOV who orders 8 times has a higher LTV ($320) than a customer with a $90 AOV who orders once. Both AOV and purchase frequency need to be tracked to understand LTV.
Can I calculate LTV by cohort in Taptic?
Yes. Because Taptic gives you raw SQL access to your Shopify orders and customers tables, you can write cohort-based LTV queries — grouping customers by their first order month and summing revenue over any subsequent window. The customer lifetime value query is the starting point; cohort segmentation can be added with a GROUP BY on first_order_month.
What Shopify data does Taptic use to calculate LTV?
Taptic uses the orders table (order totals, customer IDs, created dates) and the customers table (email, acquisition date, tags). Refunded amounts are subtracted using the refunds table. All three tables are imported automatically when you connect your Shopify store.
All Shopify queries, use cases, and SQL examples in one place.
Shopify Analytics hub — queries, use cases, and SQL examples

Stop calculating this in spreadsheets

Connect Shopify to Taptic Data and run this calculation automatically from plain English — against your real data, on a schedule, delivered to your team.

Start Free — $29.99/moTry the Live Demo