Customer Retention Rate Formula: How to Calculate It
By Nikita Tolkachev · Co-founder & CTO, Toki
The customer retention rate formula with a worked example, the version that works for online stores, and real repeat rates from five Shopify brands.
Customer retention rate (CRR) is the share of the customers you had at the start of a period who are still your customers at the end of it. The 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 you gained during the period
Subtracting N is the whole point. New customers make the end count look healthy, but they tell you nothing about whether you kept the people you already had.
A worked example
You start the quarter with 1,000 customers (S). During the quarter you win 300 new ones (N) and end with 1,050 (E).
((1,050 − 300) ÷ 1,000) × 100 = 75%
Of the 1,000 customers you started with, 750 are still around and 250 are gone. The customer count went up by 50, which looks like growth, but a quarter of the original base walked away.
How to calculate it in Excel or Google Sheets
Put customers at the start in column A, new customers in column B and customers at the end in column C. In column D:
=(C2-B2)/A2
Format column D as a percentage. To track it month by month, add one row per month and make each month's starting count equal to the previous month's ending count (type =C2 in cell A3).
The catch for online stores: who counts as a customer?
The formula comes from subscription businesses. There, "customers at the end of the period" is easy: everyone with an active subscription. A Shopify store has no cancel button. Someone who bought in March might buy again in June, or never, and nothing marks the difference.
So before you can use the formula, you have to decide what an active customer is: someone who ordered within a window that matches how often people normally buy from you. That might be 90 days for coffee or supplements, or a year for shoes and furniture. Then S and E are the active customers at the start and end of the period, and N is the first-time buyers in between.
The cleaner way to measure this in ecommerce is cohort retention. Instead of counting customers at two points in time, follow one group:
- Take everyone who ordered in one period, say Q1.
- Count how many of them ordered again in the next period, Q2.
- Divide the second number by the first.
If 800 customers ordered in Q1 and 176 of them ordered again in Q2, your quarter-to-quarter retention is 22%. There are no new customers to subtract, because you're following a fixed group. Shopify's Customer cohort analysis report does this for you, grouping customers by the month of their first order and showing how many come back in each month after (Shopify Help Center).
Whichever version you use, pick one definition and one window and stick with them. Changing the window moves the number more than almost anything you do in the store.
Retention rate, churn and repeat purchase rate are different numbers
These get used interchangeably, but they answer different questions:
| Metric | Formula | What it tells you |
|---|---|---|
| Customer retention rate | ((E − N) ÷ S) × 100 | Of the customers I had, how many did I keep this period? |
| Churn rate | (Customers lost ÷ S) × 100, which is 100% − retention rate | How many did I lose? |
| Repeat purchase rate | (Customers with 2+ orders ÷ customers with 1+ order) × 100 | How many buyers ever come back for a second order? |
| Returning customer (Shopify) | A customer whose order history already includes at least one order | Which of this period's buyers had bought before? |
The Shopify definition comes from its customer reports, which also include a Returning customers report listing everyone with two or more orders. For more metrics in the same family, see seven retention metrics for Shopify stores.
What's a good customer retention rate?
There's no universal benchmark worth copying. The industry-average tables that circulate online lump banks, telecoms and retailers together, and they say little about a Shopify store. What matters is your category, the window you measure over, and whether your own number is moving in the right direction.
Our own data shows how much the number varies. This is the repeat purchase rate (customers with two or more orders) at five stores that run Toki, split into loyalty or membership members and everyone else:
| Store | What it sells | Program | Members | Non-members |
|---|---|---|---|---|
| Harmon Discount | Discount retail | Paid membership + points | 94.6% | 37.8% |
| ANOTHERSOLE | Footwear | Paid membership | 87.8% | 12.4% |
| GOAT | Specialty candy, 9 stores | Paid membership + points | 72.3% | 26.6% |
| GardenCup | Meal delivery | Points | 71.7% | 39.8% |
| For Them | Body care | Paid membership | 62.1% | 11.3% |
We measured this in March 2026, across every order Toki had recorded for each store. That's about 10 months of orders for ANOTHERSOLE and more than five years for GOAT.
Three things stand out:
- The baseline varies a lot. Non-members come back at 11% to 40%, depending on the store. The same metric looks completely different for a discount retailer and a footwear brand.
- Members come back far more often, 1.8 to 7 times as often as non-members at the same store.
- Not all of that gap is the program. Customers who join a loyalty program, or pay for a membership, were often keen to begin with. Treat the gap as the number to watch in your own store, not as proof of cause.
The windows above aren't the same, either, which is another reason not to compare lifetime repeat rates between stores. In Toki, the Sales tab in Analytics shows repeat purchase rate over fixed 1, 3 and 6 month windows, and you can filter it by segment to compare members with everyone else (Analytics).
How to improve your retention rate
The retention rate is the result. These are the things that move it:
- Give people a reason to come back between purchases. A points balance they can see and spend works best when the first reward is within reach (points and rewards).
- Offer frequent buyers a membership. At ANOTHERSOLE, For Them and Harmon Discount, paid members repeat at 62% to 95% (paid memberships).
- Stay in front of customers without paying for ads. An Apple Wallet loyalty card puts your balance on the lock screen.
- Make the second order easy. The biggest drop-off is between the first order and the second: in the table above, 60% to 89% of non-members never ordered again. Your post-purchase emails are where you win that second order.
- Catch customers before they lapse. Here's how to reduce customer churn, from proactive support to spotting at-risk customers early.
To decide how much retention is worth spending on, pair this number with customer lifetime value and your customer retention cost.
FAQ
What formula is used to determine a company's customer retention rate?
((E − N) ÷ S) × 100. Take the customers at the end of the period, subtract the new customers gained during it, divide by the customers at the start, and multiply by 100.
How do you calculate customer retention rate in Excel?
With start customers in A2, new customers in B2 and end customers in C2, use the formula =(C2-B2)/A2 and format the cell as a percentage.
What's the difference between retention rate and churn rate?
They're two sides of the same count. For the same period and the same definition of a customer, churn rate = 100% − retention rate. A 75% retention rate means 25% churn.
How do you calculate patient or client retention rate?
The formula is the same, with patients or clients instead of customers. The tricky part is the same too: decide what counts as active, for example a client who has booked within their usual interval, and measure everyone against that window.
Is retention rate the same as repeat purchase rate?
No. Retention rate follows the customers you had at the start of a period. Repeat purchase rate is the share of all buyers who ever placed a second order. Online stores often track repeat purchase rate because it doesn't need a definition of "active customer".
What's the difference between customer retention rate and customer retention cost?
Retention rate is how many customers you keep. Retention cost is what you spend to keep them. See the customer retention cost formula for that calculation.