Metric · E-commerce

What is repeat purchase rate, and how do you measure it in Metabase?

Repeat purchase rate (RPR) is the share of customers who buy more than once. It's the clearest signal of retention and loyalty in a store, and the foundation of customer lifetime value: acquiring customers is expensive, so a healthy repeat rate is what makes the economics work. Measure it in Metabase from store data synced into a database (Shopify, WooCommerce, or Klaviyo).

TL;DR — RPR = customers with 2+ orders ÷ total customers. Read it by acquisition cohort so recent buyers (who haven't had time to return) don't drag the number down, and pair it with AOV to understand true repeat value.

How is repeat purchase rate calculated?

Over a chosen window, RPR = the number of customers with more than one order ÷ the total number of customers who ordered. Two refinements matter:

  • Cohort it — group customers by their first-order month. A blended rate mixes seasoned customers with new ones who simply haven't returned yet.
  • Fix the window — "repeat within 90 days" is more actionable than an all-time rate that only ever goes up.

What data does repeat purchase rate need?

  • An orders table with a stable customer_id and created_at.
  • A financial/payment status so unpaid or cancelled orders don't count.
  • A reliable identity — dedupe guest checkouts by email so one person isn't counted as several first-time buyers.

SQL patterns

Overall repeat purchase ratePostgreSQL

Share of paying customers with more than one order.

-- Repeat purchase rate: share of customers with more than one paid order.
WITH per_customer AS (
  SELECT
    o.customer_id,
    COUNT(*) AS orders
  FROM orders o
  WHERE o.financial_status = 'paid'
  GROUP BY o.customer_id
)
SELECT
  COUNT(*)                                        AS customers,
  COUNT(*) FILTER (WHERE orders > 1)              AS repeat_customers,
  ROUND(100.0 * COUNT(*) FILTER (WHERE orders > 1)
        / NULLIF(COUNT(*), 0), 1)                 AS repeat_purchase_rate_pct
FROM per_customer;
Repeat rate by acquisition cohortPostgreSQL

Group customers by first-order month so maturity is comparable.

-- Repeat rate by first-order month (acquisition cohort).
WITH first_order AS (
  SELECT customer_id, MIN(created_at) AS first_at
  FROM orders WHERE financial_status = 'paid'
  GROUP BY customer_id
),
orders_per_customer AS (
  SELECT customer_id, COUNT(*) AS orders
  FROM orders WHERE financial_status = 'paid'
  GROUP BY customer_id
)
SELECT
  date_trunc('month', f.first_at)                 AS cohort_month,
  COUNT(*)                                        AS customers,
  ROUND(100.0 * COUNT(*) FILTER (WHERE o.orders > 1)
        / NULLIF(COUNT(*), 0), 1)                 AS repeat_rate_pct
FROM first_order f
JOIN orders_per_customer o ON o.customer_id = f.customer_id
GROUP BY date_trunc('month', f.first_at)
ORDER BY cohort_month;

Pitfalls

Blending all customers regardless of tenure.→ Recent buyers haven't had time to return; cohort by first-order date.
Counting guest checkouts as separate people.→ Dedupe by email, or repeat rate looks worse than it is.
Using an all-time window.→ All-time rates only rise and hide recent decay. Use a fixed window like 90 or 365 days.
Ignoring refunds and cancellations.→ A returned second order isn't really a repeat purchase — filter to paid, kept orders.

Where this metric applies

Analytics

Metrics

FAQ

What's a good repeat purchase rate?
It varies enormously by category — consumables and subscriptions see high repeat rates, considered one-off purchases see low ones. Track your own trend by cohort rather than a universal benchmark, and judge it against your acquisition cost and margins.
How is repeat purchase rate related to LTV?
Repeat purchase rate is the retention input that drives lifetime value: more repeat buyers, buying more times, at a healthy average order value, all push LTV up. Improving repeat rate is usually the highest-leverage way to raise LTV.
Should I cohort by first purchase or by calendar period?
Cohort by first-purchase month when you want to measure retention fairly, because it holds customer maturity constant. Calendar-period views are useful for operational reporting, but they mix new and seasoned customers and can mask whether recent acquisition is actually sticking.