EnableYourData.com

KPI · E-commerce

Repeat purchase rate: formula and example.

Repeat purchase rate is the share of customers who place at least two orders within a period, divided by all customers who ordered in that period. It shows whether customers come back after their first purchase. A higher repeat purchase rate makes you less dependent on costly new customers.

Repeat purchase rate formula

Customers with 2 or more orders ÷ all customers who ordered in the period × 100%

Worked example

In 2025, 3,000 customers order from Acme Groothandel. Of these, 840 place two or more orders. Repeat purchase rate is 840 ÷ 3,000 × 100% = 28%.

Fictitious figures for Acme Groothandel, a sample wholesaler.

How to read this KPI

A rising rate means more customers return, for example thanks to good service, consumable products or targeted emails. Compare it with the same period last year and by acquisition channel or product category; customers won with a heavy discount often return less. The length of the period strongly affects the result, so only compare periods of equal length.

Pitfalls with repeat purchase rate

  • Comparing periods of different length; more customers buy again over a year than over a month.
  • Treating guest checkouts without a stable customer ID as separate customers, which hides repeat buyers.
  • Customers whose first purchase fell just before the period ended had little time to come back.

SQL & DAX

Calculating repeat purchase rate in SQL and DAX

Two examples on a fictitious data warehouse for Acme Groothandel: a PostgreSQL query and a measure for a Power BI model. Adjust table and column names to your own model.

SQL · PostgreSQL
WITH per_customer AS (
  SELECT customer_id, COUNT(*) AS orders
  FROM orders
  WHERE status <> 'cancelled'
    AND order_date >= date_trunc('year', current_date) - interval '1 year'
    AND order_date < date_trunc('year', current_date)
  GROUP BY customer_id
)
SELECT COUNT(*) AS customers,
       COUNT(*) FILTER (WHERE orders >= 2) AS repeat_customers,
       ROUND(100.0 * COUNT(*) FILTER (WHERE orders >= 2)
             / NULLIF(COUNT(*), 0), 1) AS repeat_purchase_pct
FROM per_customer;
DAX · Power BI
Repeat Purchase Rate =
VAR Buyers = VALUES(Orders[customer_id])
VAR Repeaters = FILTER(Buyers, CALCULATE(DISTINCTCOUNT(Orders[order_id])) >= 2)
RETURN
    DIVIDE(COUNTROWS(Repeaters), COUNTROWS(Buyers))

In ENABLE

Tracking this KPI in ENABLE

Plain-language questions

Ask for repeat purchase rate per month, customer or product in the SQL Explorer with AI. The AI writes the SQL, you see the query and run it yourself; the AI only receives metadata.

Read more →

In your Power BI dashboard

Define the KPI as a measure in your Power BI model and show it in the portal, with "Last refreshed" next to it. Access profiles and optional row-level security decide who sees which figures.

Read more →

Custom dashboards (pilot)

Add the KPI as a tile to a custom dashboard, compared with last year. The Dashboard Builder is a pilot and can be switched on per client.

Read more →

Monthly targets

With the built-in Targets app you set a target for the KPI per month, so you see actuals and target side by side.

Read more →

FAQ

Frequently asked questions

How do you calculate repeat purchase rate?

Count the customers who placed two or more orders in a period and divide by the total number of customers who ordered in that period. With 1,000 customers of whom 250 bought again, the rate is 25%. Always use a fixed period, usually a year.

What is the difference between repeat purchase rate and returning customer rate?

Repeat purchase rate checks whether customers order more than once within a single period. Returning customer rate checks whether a customer who orders now has bought from you before, even if that was in an earlier period. The first measures loyalty within a period; the second describes the make-up of your customer base.

How do you increase repeat purchases?

Common tactics are follow-up emails after the first order, replenishment reminders for consumables, a loyalty discount and good service on returns. Measure for each tactic whether the rate rises compared with a similar period. Time to second purchase helps you decide when to contact a customer.

Use AI on your own data. Securely, and without the headache.

In an online demo we show how ENABLE makes your data securely available and how you build on it: describing an app in the AI Builder, plain-language questions, dashboards and APIs. And how we set it up and manage it for you.