- The classic formula is retention rate = (customers at end of period − new customers in the period) ÷ customers at start × 100. For a store without subscriptions, you first have to define what "active customer" means, using a time window based on how often people actually rebuy.
- Track three numbers, not one: period retention rate, cohort retention by first-order month, and the first-to-second order rate. Each answers a different question.
- There is no universal "good" retention rate. A good one is improving across your own cohorts and is high enough that customers pay back what you spent to acquire them.
What is customer retention rate?
Customer retention rate is the share of existing customers who keep buying from you over a given period. It is the mirror image of churn rate: if 70% of customers are retained, 30% churned.
For a subscription brand, retention is easy to see. Someone either has an active subscription or they cancelled. Most Shopify stores don’t work that way. A customer who bought a jacket in March hasn’t “cancelled” anything by June. They may simply not need another jacket yet. That’s why eCommerce retention needs one extra decision before any math: how long can a customer go without ordering and still count as retained?
What is the customer retention rate formula?
The standard formula comes from subscription businesses:
Retention rate = (E − N) ÷ S × 100
- S = customers at the start of the period
- E = customers at the end of the period
- N = new customers acquired during the period
You subtract N because new customers didn’t exist at the start, so they can’t count as retained. Leaving them in is the most common error. It lets strong acquisition hide weak retention.
Example (illustrative numbers): a store starts the quarter with 2,000 active customers. During the quarter it gains 600 new customers and ends with 2,100 active customers. Retention rate = (2,100 − 600) ÷ 2,000 × 100 = 75%.
The purchase-based version for non-subscription stores
For most DTC stores, a more direct version works better:
Retention rate = customers from the base period who ordered again in the measurement period ÷ customers in the base period × 100
Example (illustrative): 3,000 customers ordered between January and June. Of those, 840 placed another order between July and December. Retention rate = 840 ÷ 3,000 × 100 = 28%.
This version answers a plain question: of the people who bought from us, how many came back? It needs only order data, and it doesn’t depend on how you define “active” at a single point in time.
How do you choose the right time window?
The window decides whether your retention rate means anything. Too short and you count loyal customers as lost. Too long and the number reacts so slowly that you can’t act on it.
Set it from your own data, not a generic rule:
- Take every customer with at least two orders.
- Calculate the days between their first and second order.
- Find the median. That is your typical repurchase gap.
- Set your window comfortably beyond it, so a normal customer has time to come back.
How your products are bought shapes the answer:
| Product pattern | How customers rebuy | Window approach |
|---|---|---|
| Consumables (coffee, supplements, pet food, skincare) | On a predictable cycle as they run out | Short window tied to the usage cycle; check monthly |
| Fashion and accessories | Seasonally, driven by new collections | Medium window covering at least one season |
| Gifts and occasion products | Around holidays and personal dates | Twelve months, so each buying occasion is included |
| Durables (furniture, equipment) | Rarely; repeat orders are often accessories | Long window; also track accessory or add-on orders |
If your catalog mixes patterns, calculate retention separately for each main category. A blended rate that mixes coffee buyers with grinder buyers describes nobody.
Which retention metrics should you track?
One retention rate hides most of the story. Track these three together:
| Metric | Question it answers | How to calculate | Best used for |
|---|---|---|---|
| Period retention rate | Of last period’s customers, how many bought again this period? | Purchase-based formula above | Quarterly or annual health check |
| Cohort retention | Are customers we acquire now coming back more or less than before? | % of each first-order-month cohort who reorder by day 30, 60, 90, 180 | Spotting trends early; comparing channels and offers |
| First-to-second order rate | How many first-time buyers ever place a second order? | Customers with 2+ orders ÷ customers with 1+ orders, within a set window | Finding the biggest retention lever |
Cohort analysis is the most useful of the three, because it compares like with like. A customer acquired last month hasn’t had time to reorder, so lumping them in with older customers drags the blended rate down for no reason.
The first-to-second order rate matters because a customer who never places a second order never becomes repeat revenue. Our guide to the first-to-second purchase rate goes deeper on how to raise it.
How do you calculate retention rate from Shopify data?
You can do this in a spreadsheet in under an hour.
Step 1: Export orders
From Shopify admin, export orders for at least the last 18 months. Keep these columns: customer email (or customer ID), order date, order total, financial status and cancellation status. WooCommerce and Magento exports contain the same fields under slightly different names.
Step 2: Clean the data
- Remove cancelled orders, fully refunded orders and test orders.
- Merge guest checkouts into one customer by email address. Without this step, a loyal guest buyer can look like five one-time customers.
- Exclude wholesale or B2B orders if they follow a different buying pattern.
Step 3: Mark each customer’s first order date
Add a column with the earliest order date for each email. This gives you the cohort (first-order month) for every customer.
Step 4: Count the base and the returners
For period retention, count unique customers who ordered in the base period. Then count how many of them have at least one order in the measurement period. Divide the second number by the first.
For cohort retention, use a pivot table: first-order month down the side, months since first order across the top, and the share of the cohort that has reordered in each cell.
Step 5: Check against Shopify’s own reports
Shopify Analytics includes a customer cohort analysis report that groups customers by the month of their first order and can show retention over time, plus reports for returning and one-time customers. Use them to sanity-check your spreadsheet. If the numbers differ, check how each handles guest checkouts, refunds and the time window before deciding which to trust.
Worked example: reading a cohort table
Here is a simplified cohort table for a skincare store. The numbers are illustrative.
| First-order month | New customers | Reordered by day 30 | By day 90 | By day 180 |
|---|---|---|---|---|
| January | 500 | 9% | 20% | 28% |
| February | 450 | 10% | 22% | 30% |
| March | 600 | 6% | 14% | (too early) |
| April | 520 | 11% | (too early) | (too early) |
What it tells you:
- February beat January at every stage, so something improved, perhaps a new post-purchase flow.
- March is weaker. It is also the largest cohort. Check what changed: a big discount promotion, a new ad channel or a product that disappointed. Customers acquired on deep discounts can reorder less, and your cohorts will show whether that’s true for you.
- April looks healthy at day 30. Wait for day 90 before celebrating.
Notice that a single blended retention rate for the year would have hidden all three insights.
What does a good retention rate look like?
We won’t give you an industry benchmark, because a single number would mislead more than it helps. Retention depends on product type, price point, purchase cycle, subscription share and how you acquire customers. A pet food brand and a furniture brand can both be healthy with very different rates.
Judge your rate on three tests instead:
- Trend. Are recent cohorts retaining as well as, or better than, older ones at the same age?
- Economics. Does the repeat revenue from a typical customer cover what you paid to acquire them within an acceptable time? This is your CAC payback period, and it connects retention directly to profit.
- Segments. Are your best acquisition channels and entry products the ones that retain best? If not, you may be scaling the wrong things.
A retention rate that is flat in a business that needs repeat orders to break even is a problem, whatever the number. A modest rate in a business that profits on the first order may be fine.
How do you improve retention once you’ve measured it?
Measurement only pays off if it changes what you do next. Work through this list:
- [ ] Split retention by first-order product, channel and discount used, and find the best and worst cohorts.
- [ ] Find your median repurchase gap and time post-purchase messages to land before it.
- [ ] Build the core lifecycle flows; see the eight email flows every Shopify store needs.
- [ ] Set up a win-back flow for customers who pass your window without reordering.
- [ ] Segment customers by value and recent intent with RFM segmentation, so offers go only to those who need them.
- [ ] Recalculate monthly, at the same window and with the same cleaning rules.
FAQ
What is the difference between retention rate and repeat purchase rate?
Retention rate measures how many customers from a defined period came back in the next one. Repeat purchase rate usually measures the share of all customers who have ever ordered more than once. Retention is time-bound and better for spotting trends.
Should I calculate retention monthly, quarterly or yearly?
Match it to your repurchase cycle. Fast-moving consumables can support monthly tracking. Most other stores get a more stable, useful picture from quarterly period retention plus monthly cohort tables.
Does retention rate include customers who only bought with a discount?
Yes, but split them out. Discount-acquired customers can behave differently, and comparing them with full-price buyers shows whether your promotions bring in customers who stay.