Book an LTV:CAC Gameplan

Guide Retention

How to calculate customer retention rate for an online store

Lilou & Ben6 min read

Most retention rate formulas come from subscription businesses, where a customer is either paying this month or has cancelled. A store’s customers buy when they choose to, so on the ecommerce accounts we work on we count retention by starting month and by time window. This guide shows both versions, how to work out yours from a Shopify export, and how to read the number. It also covers churn rate, and repeat purchase rate, the quicker check that Shopify’s returning customer rate is close to.

What is the customer retention rate formula?

The standard formula, sometimes called the customer retention ratio, is:

Retention rate = (customers at the end of the period minus new customers won during it) ÷ customers on the first day of the period × 100.

  • Customers on the first day. Everyone who was a customer when the period began, say 1,000.
  • Customers at the end. Everyone who is a customer on the last day, say 1,050.
  • New customers. Everyone who joined during the period, say 200. Taking them out leaves only the people you started with.

Here that’s (1,050 minus 200) ÷ 1,000 = 85%. The other side of it is churn: 100% minus 85% means 15% of the starting customers left during the period. It works well for subscriptions, memberships and software, because everyone on the books on the last day is clearly still a customer.

How to measure retention for an online store

In a store where people reorder when they choose, there’s no cancel date. Someone who bought in January and hasn’t bought since might reorder next week, or never. So how many customers do you have at the end? There’s no clear count, and the standard formula gives a number that moves with however you choose to define it. It’s like counting your friends: the total depends a lot on whether the kid you sat next to in Year 10 still counts.

We use a cohort version in its place:

  • Step 1. Take every customer who placed their first order in one month. That group is the cohort.
  • Step 2. Pick a window about half as long again as the product lasts. Some customers reorder a few weeks after they run out, so the extra weeks give them slack. For something that lasts about 60 days, we’d use 90.
  • Step 3. Count how many of the cohort placed a second order within that window, and divide by the size of the cohort.

Here’s a made-up store. It sells a product that lasts about two months, and 400 people placed their first order in March.

March’s first‑time customers, by window
WindowReordered by thenRate
30 days4812%
60 days10025%
90 days14035%

Each row is a running total, so the 140 at 90 days includes the 48 who reordered in the first 30. The same customers give three different rates, so the window is part of the number. Choose it once, keep it the same each month, and compare each month’s cohort with the ones before it. If April’s cohort reaches 35% sooner than March’s did, look at what changed between them: a flow, an offer, or the first products people bought.

What is repeat purchase rate?

Repeat purchase rate is the share of all your customers who have ordered more than once:

Repeat purchase rate = customers with two or more orders ÷ all customers × 100.

If 1,400 of the 5,000 people who have ever ordered from a store have ordered at least twice, its repeat purchase rate is 28%. It’s quick to read, and Shopify’s returning customer rate is a close relative of it. It mixes customers from every year together, though, so it moves for reasons that have nothing to do with retention. A big month of new customers pulls it down, because those people haven’t had time to reorder yet. A café has the same problem on a busy Saturday: the regulars are all there, and the crowd of new faces makes them look rare. So we use repeat purchase rate as a quick check, and cohort retention to judge whether a change worked.

How do you calculate customer churn rate?

Customer churn rate is the share of customers you had at the start of a period who left during it:

Churn rate = customers lost during the period ÷ customers on the first day × 100.

In the standard version it’s the other side of retention, so the example above with 85% retention has 15% churn. A subscription store can count churn from cancellations. A store where people reorder when they choose has to decide when a customer counts as lost. We use the point where nine in ten repeat buyers have already reordered, the 90th percentile of the store’s own reorder gap, which is also when our win-back emails start. Anyone past that point since their latest order, without another one, counts as churned.

Klaviyo gives a second opinion once an account qualifies. Its predictive analytics scores each customer’s churn risk and expected next order date, for stores with at least 500 customers who have ordered, 180 days of order history with orders in the last 30 days, and some customers with three or more orders. It reads each customer’s timing and not which product they bought, so we set it beside the reorder gap from the orders export, and where the two disagree, the product’s own gap wins.

To turn a monthly churn rate into a yearly one, raise the monthly retention rate to the power of 12 and take the result from 100%. At 5% monthly churn, retention is 95%, and 0.95 to the power of 12 is about 0.54, so roughly 46% of the starting customers have left within a year. That’s why a monthly figure that looks small is worth checking as a yearly one before you decide whether it’s a problem. It’s the dripping tap in the laundry, where one drop at a time looks like nothing until the water bill arrives. Each customer who churns takes their later orders out of your lifetime value, and our calculator counts those later orders in the total.

How to work it out from a Shopify export

  • Export your orders. You need each customer’s email and the date of each order, going back to the store’s first ever order, so a returning customer is never mistaken for a new one.
  • Clean the list. Leave out cancelled, fully refunded and test orders. If you sell subscriptions, decide whether a rebill counts as a second order and keep that the same every month. Someone who used two email addresses shows up as two people, so merge them where you can.
  • Mark each customer’s first order. Sort by customer and date, then flag the earliest order for each person.
  • Group by first‑order month. Each month’s group is a cohort.
  • Count second orders inside the window. For each cohort, count the customers whose second order falls within your window of their first.

Leave out cohorts that haven’t had the full window yet. With a 90-day window, March’s cohort is complete once the last March customer’s 90 days are up, so you’d read it in early July. If your Shopify plan includes the customer cohort analysis report, it shows a version of this table without the spreadsheet work.

If you’d like to work out your cohort retention with us, bring an orders export, rough is fine, and we’ll build the table with you and look at which flow would move it most. Book an LTV:CAC Gameplan.

Is a 50% retention rate good?

A 50% retention rate is neither good nor poor on its own, because the window you count over and the profit on each repeat order decide what it is worth. Take two stores and count one repeat order per returning customer. At $10 of profit per order, a 50% rate adds $5.00 of profit per customer. At $35 of profit per order, a 30% rate adds $10.50. The store with the lower rate gets just over twice as much back from its second orders ($10.50 against $5.00).

Whether that’s enough depends on what the customer cost to win and how quickly you need the money back. Our customer lifetime value calculator turns your retention and margin into the most you can pay per customer, our LTV:CAC ratio guide shows how to read that against your acquisition cost, and the CAC payback period shows how many months it takes.

How to improve customer retention rate

Retention moves when more first-time customers get a reason and a reminder to order again before the window closes. The flows we build first to lift it are:

Before working with us, businesses usually get 10% to 17% of their revenue from email and SMS, and across our clients the average is 40%. Our beauty case study shows how we rebuilt one brand’s email around replenishment timing and post-purchase flows, and our guide to customer retention strategies covers the wider plan, from the first order to winning back lapsed customers.

More guides

  1. 01RetentionEcommerce loyalty programs: which type to choose and how to tell it’s working6 minread
  2. 02RetentionCustomer retention strategies for an online store, in the order we build them6 minread
  3. 03RetentionLifecycle marketing for online stores: the seven stages and what to send6 minread
  4. 04RetentionRFM segmentation: score your customers and email each segment its own message7 minread
  5. 05RetentionZero-party data: what it is, how stores collect it, and how we use it7 minread
  6. 06LTV:CACThe LTV:CAC ratio for ecommerce: formula and what good looks like7 minread

Invitation

LTV:CAC Gameplan with Lilou & Ben

30 minutes, free. We look at what a new customer costs you and what they’re worth after, and you keep the three changes we’d make first either way.

Book an LTV:CAC Gameplan