Magicianly

Analytics & Testing

Customer Retention Rate: How to Calculate It for an Ecommerce Store

Quick answer: Customer retention rate is the percentage of customers who keep buying from you over a given period. The classic formula is (customers at the end of the period - new customers gained) ÷ customers at the start × 100. For an ecommerce store without subscriptions, we'd rather track cohort retention: of the people who placed their first order in a given month, how many ordered again within 30, 60 and 90 days.

The classic formula comes from subscription and contract businesses, where a customer is either active or gone. Most ecommerce customers don't work like that. Nobody cancels a candle brand. They just stop buying, or they come back four months later.

So the number you get depends almost completely on how you define an "active" customer. Change the window and the rate changes, even though nobody behaved any differently.

Below you'll find the classic formula with a worked example, why it misleads in ecommerce, the cohort version we use instead, where to find it in Shopify, and what counts as a good number.

By Emiel Dingemans, Founder of Magicianly

Updated

What Is Customer Retention Rate?

Customer retention rate (CRR) is the percentage of existing customers a business keeps over a period of time. It leaves new customers out on purpose, because the question is how well you hold on to the people you already had. Acquisition is a separate number.

It answers one question: of the customers we had, how many are still buying?

In ecommerce, "still buying" needs a time window. A customer who ordered once in March isn't lost in April. They might just not need anything yet. That window is where most retention numbers go wrong.

How Do You Calculate Customer Retention Rate?

Take the customers you had at the end of a period, subtract the new customers you gained during it, and divide by the customers you had at the start.

The customer retention rate formula

Customer 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 gained during the period

Say you start the quarter with 2,000 active customers. During the quarter you gain 600 new ones, and you end with 2,100. That's (2,100 - 600) ÷ 2,000 × 100 = 75%. You kept 1,500 of the 2,000 customers you started with.

Worked example of the customer retention rate formula: 2,000 customers at the start, 600 new, 2,100 at the end, which gives 75% retained and 25% churn.
New customers come out of the count first, so a strong acquisition month can't make retention look better than it is.

Churn rate is the mirror image. If you kept 75%, your churn rate for that period is 25%.

Why Does the Classic Formula Mislead Ecommerce Brands?

Because it needs a clean count of active customers at the start and the end, and a store that sells one-off purchases doesn't have one.

A subscription brand knows exactly who's active: they have a live subscription. A store selling skincare, apparel or furniture has to pick a rule, like "ordered in the last 12 months". That rule decides the answer:

  • A long window flatters you. With a 12-month definition, someone who bought once 11 months ago still counts as retained.
  • A short window punishes slow categories. A mattress brand using a 90-day window will look like it loses almost everyone, because nobody buys a mattress every quarter.
  • Sale months distort the next period. A big Black Friday brings in a wave of new customers, and they all land in the next period's starting count, even though plenty of them were only ever going to buy at a discount.
  • Old and new customers get mixed. Someone from three years ago and someone from last month count the same, so you can't see whether the customers you're acquiring now behave better or worse.

The formula isn't wrong. It just answers a vague question. For one-off purchases we want a sharper one.

Which Retention Rate Should an Ecommerce Brand Track?

Track cohort retention. Group customers by the month of their first order and measure what share of each group orders again within a fixed number of days. We look at 30, 60 and 90 days first, then 180 and 365 days for slower categories.

Because every cohort is measured at the same age, you can compare them fairly. If customers who first bought in June are more likely to come back within 60 days than customers who first bought in January, whatever you changed in between is working. If they aren't, it isn't.

The first step of that curve is the one we watch most closely: the first-to-second purchase rate. The first order is hard to get. The second one is where a customer starts to become profitable. We explain how to read it in our guide to repeat purchase rate.

Here's how the main "are customers coming back?" numbers compare:

MetricThe question it answersHow it's calculatedWatch out for
Customer retention rate (classic)Of the customers we had, how many did we keep?(E - N) ÷ S × 100It depends on how you define an active customer
Returning customer rateHow many of this period's buyers had bought before?Returning customers ÷ all customers who orderedIt can drop in a sale month, because new buyers fill the denominator
Cohort retention rateOf the people who first bought in one month, how many came back within a set number of days?Customers in the cohort who ordered again ÷ all customers in the cohortYou need to wait until the window has passed before you read it
Repeat purchase rateHow many customers have ordered more than once?Customers with 2 or more orders ÷ all customersIt means little without a time window

How Do You Find Customer Retention Rate in Shopify?

Shopify gives you two of these numbers out of the box. Returning customer rate shows up in Shopify Analytics, where Shopify defines it as returning customers divided by all customers who placed orders. For the cohort view, use the Customer cohort analysis report.

That report groups customers by the month of their first order and shows what they did in the months after. In Shopify's analytics reference, customer retention rate in that report means the percentage of customers in a cohort who placed an order in a given period.

Illustrative cohort table showing the share of January to April customers who ordered again in months 0 to 3, with notes on reading columns, rows and month 0.
Illustrative numbers. Compare cohorts down a column, at the same age, to see whether retention is improving.

Two things to know when you read it:

  • Period 0 is the first month itself. Shopify counts repeat orders placed in the same period as the first order in that column. For a brand with fast reorders, that's real retention, so don't skip it.
  • Read down a column as well as across a row. A row shows how one cohort fades over time. A column compares cohorts at the same age, and that's the comparison that tells you whether things are getting better.

Calendar months are fine for a first look. If you want exact windows like "within 60 days of the first order", export your orders and calculate it yourself in a spreadsheet.

What Is a Good Customer Retention Rate for Ecommerce?

There's no universal number. A coffee brand and a mattress brand shouldn't be held to the same target, because their customers need to buy again at completely different speeds.

Shopify's own analytics reference notes that most stores show a returning customer rate of 20 to 40%. That's a useful sanity check for that one metric. It isn't a cohort retention target, and it moves with every sale you run.

The better benchmark is your own history. Are this quarter's new customers coming back faster, and more often, than the ones you acquired a year ago? If so, retention is improving, whatever an industry average says.

One pattern we see in most accounts we work on: the majority of returning customers buy again within 30 days of their first order. That's why the 30-day number is the first one we check, and why the post-purchase flow matters so much. Here's how to measure that timing for your own store: average time between orders.

How Is Customer Retention Rate Different From Churn Rate?

Churn rate is the share of customers you lost. For the same group and the same period, churn rate is 100% minus your retention rate. Keep 75%, and you churned 25%.

For one-off purchases, churn is a judgment call, because a customer who hasn't ordered yet isn't necessarily gone. For subscription brands it's concrete: a cancelled subscription is churn. If you sell subscriptions, measure subscriber churn separately from one-off customers. We cover how in our guide to subscription metrics.

How Do You Improve Customer Retention Rate?

Start with the second purchase, then time everything else to how your customers actually reorder.

  • Fix the first 30 days. Post-purchase emails should help people use the product and introduce the next logical one.
  • Time replenishment to real usage. If the product runs out in 45 days, remind people before day 45, not on a generic schedule.
  • Cross-sell what goes with the first product, not more of the same thing.
  • Run winback after the normal repurchase window, not before it. Before that point, a "we miss you" email is just noise.
  • Look at the product and the offer too. If a cohort you acquired with a deep discount never comes back, email won't fix that.

The full playbook is in how to increase your ecommerce repeat purchase rate. If you'd rather have us build that system for you, that's what our retention marketing service does.

So Which Customer Retention Rate Should You Watch?

Use the classic formula when someone asks for "the" retention rate, but don't run the business on it. Track cohort retention at 30, 60 and 90 days, with first-to-second purchase rate as the headline number. Compare cohorts with each other, not with an industry average. And read it next to customer lifetime value and margin, because keeping customers with deep discounts can push retention up and still lose you money.

Frequently Asked Questions

What is customer retention rate?

Customer retention rate is the percentage of existing customers a business keeps over a period of time. It leaves out new customers, so it shows how well you hold on to the people you already had.

What is the formula for customer retention rate?

Customer retention rate = (customers at the end of the period - new customers gained) ÷ customers at the start × 100. For example, (2,100 - 600) ÷ 2,000 × 100 = 75%.

What is a good customer retention rate for ecommerce?

There's no single good number, because purchase cycles differ so much by category. Shopify notes that most stores show a returning customer rate of 20 to 40%. The more useful check is whether your newer customer cohorts come back faster and more often than older ones.

How do you calculate customer retention rate in Shopify?

Use the Customer cohort analysis report. It groups customers by the month of their first order and shows the share who ordered again in each following period. Returning customer rate in Shopify Analytics is a different metric: returning customers divided by all customers who placed orders.

What's the difference between retention rate and repeat purchase rate?

Retention rate looks at how many customers you kept over a period. Repeat purchase rate looks at how many customers have ordered more than once. Both need a fixed time window to mean anything, and for ecommerce we prefer measuring them by cohort.

How do you calculate churn rate from retention rate?

For the same group and the same period, churn rate is 100% minus your retention rate. If you kept 75% of your customers, your churn rate is 25%.

Want Us to Build and Manage This for You?

Related Reading