Home » Customer Retention » How to Calculate Retention Rate

How to Calculate Customer Retention Rate for Your Online Store

Updated July 2026
Customer retention rate measures the percentage of existing customers who continue buying from your store over a specific period. The formula is ((Customers at End - New Customers) / Customers at Start) x 100. This guide walks through the full calculation step by step, along with related metrics like repeat purchase rate and customer lifetime value, so you can accurately measure how well your store keeps customers coming back.

Knowing your retention rate is the foundation of every retention strategy. Without this number, you are guessing whether your loyalty programs, email sequences, and customer experience improvements are actually working. The calculation itself is straightforward, but pulling the right data and interpreting the results requires attention to how your store defines a "customer" and what time period you are measuring.

Step 1: Gather Your Customer Data

Before calculating anything, you need three numbers for a defined time period (typically a month, quarter, or year):

  • S = Number of customers at the start of the period
  • E = Number of customers at the end of the period
  • N = Number of new customers acquired during the period

"Customers" here means unique individuals who have placed at least one order. In Shopify, you can pull this from the Customers section by filtering by first order date. In WooCommerce, use the Customers report filtered by registration or first order date. Google Analytics 4 tracks "new vs. returning users" but that counts visits, not purchasers, so use your ecommerce platform's native data instead.

For example, suppose you are measuring Q2 2026 (April through June). At the start of April, you had 2,400 customers who had purchased at least once. By the end of June, you have 2,850 total customers. During Q2, you acquired 620 new first-time buyers.

Step 2: Apply the CRR Formula

The Customer Retention Rate formula is:

CRR = ((E - N) / S) x 100

Using our example numbers:

CRR = ((2,850 - 620) / 2,400) x 100 = (2,230 / 2,400) x 100 = 92.9%

This means 92.9% of the customers you had at the start of Q2 were still customers (had not churned) by the end of the quarter. Note that this measures the percentage of customers retained, not whether they all purchased again during the quarter. A customer who bought in January and has not yet churned is still "retained" even if they did not buy in Q2.

Quarterly retention rates tend to be high (80% to 95%) because the window is short. Annual retention rates are the more meaningful benchmark because they capture full purchase cycles. The same store might show 93% quarterly retention but only 35% annual retention if many customers lapse over longer periods.

Step 3: Calculate Repeat Purchase Rate

Repeat Purchase Rate (RPR) tells you what percentage of all your customers have bought more than once. This is often more actionable than CRR because it directly measures purchasing behavior.

RPR = (Customers with 2+ Orders / Total Unique Customers) x 100

If your store has 5,000 unique customers and 1,400 of them have placed two or more orders, your RPR is 28%. Industry benchmarks:

  • Consumables (supplements, skincare, coffee): 40% to 55%
  • Fashion and apparel: 25% to 35%
  • Home goods and accessories: 20% to 30%
  • Electronics and tech: 15% to 22%
  • Furniture and big-ticket items: 10% to 18%

Shopify shows RPR directly in the Analytics dashboard under "Returning customer rate." WooCommerce requires querying the database or using a plugin like Metorik. Klaviyo also tracks this if you integrate order data.

Step 4: Determine Purchase Frequency

Purchase Frequency tells you how often the average customer buys within a given period.

Purchase Frequency = Total Orders / Total Unique Customers

If you processed 8,200 orders from 5,000 unique customers over the past 12 months, your purchase frequency is 1.64 orders per customer per year. This number reveals the scale of your retention opportunity: moving purchase frequency from 1.64 to 2.0 means a 22% increase in revenue without acquiring a single new customer.

Purchase frequency varies dramatically by vertical. Grocery and food delivery services may see 30 to 50 purchases per year. Coffee subscriptions might hit 12 per year. Fashion stores typically see 2 to 4 per year. Pet supply stores see 4 to 8 per year. Compare your number against others in your specific product category.

Step 5: Calculate Customer Lifetime Value

Customer Lifetime Value (CLV) is the total revenue you can expect from a customer across your entire relationship. The simple formula is:

CLV = Average Order Value x Purchase Frequency x Average Customer Lifespan

Example: If your average order is $62, customers buy 2.3 times per year, and the average customer stays active for 3 years, your CLV is $62 x 2.3 x 3 = $427.80.

CLV tells you the maximum you should spend to acquire a customer. If your CLV is $428 and your target profit margin is 30%, you can afford to spend up to $128 per acquisition and still be profitable over the customer's lifetime. Without knowing CLV, you have no rational basis for setting acquisition budgets.

For a deeper treatment of this metric and strategies to improve it, see our guide on how to increase customer lifetime value.

Step 6: Benchmark and Set Goals

Now that you have your numbers, compare them against industry averages and set improvement targets. Realistic quarterly improvement targets are:

  • Retention rate: improve by 1% to 3% per quarter
  • Repeat purchase rate: improve by 2% to 5% per quarter
  • Purchase frequency: increase by 0.1 to 0.2 orders per year per quarter
  • CLV: increase by 5% to 10% per year

Track these metrics monthly and review trends quarterly. A single month's data can be noisy due to seasonality (holiday shopping inflates Q4 numbers, Q1 often dips). Quarterly and annual trends are more reliable indicators of whether your retention efforts are working.

Set up a retention dashboard in your analytics tool or a spreadsheet that tracks these five numbers over time. The trend matters more than any single data point. If retention rate is climbing quarter over quarter, your strategies are working even if the absolute number is still below your industry's average.

Common Mistakes When Calculating Retention

Counting email subscribers as customers. Only count people who have actually purchased. An email subscriber who has never bought is a lead, not a customer, and including them inflates your retention numbers.

Using too short a measurement window. Weekly or bi-weekly retention measurements are too volatile to be useful for most ecommerce stores. Monthly is the minimum useful granularity, quarterly is standard, and annual is the most comparable across businesses.

Ignoring cohort effects. Customers acquired through a 50% off sale will retain at different rates than customers who found you through organic search. Breaking retention down by acquisition cohort (month and source) reveals which customer segments are most valuable and which channels produce low-quality buyers.

Confusing retention with reactivation. If a customer churned for 18 months and then returns, they are a reactivated customer, not a retained one. Blurring this distinction makes your retention rate look better than it is and hides the churn problem.

Key Takeaway

Customer retention rate, repeat purchase rate, and customer lifetime value are the three numbers every ecommerce store must track. Together, they tell you whether your business is building a sustainable customer base or running on an expensive treadmill of constant new acquisition.