RFM Analysis: How to Segment Ecommerce Customers
RFM analysis is a way of grouping customers by how recently they bought, how often they buy and how much they spend. It turns a single customer list into a handful of segments, such as your best customers, customers you are about to lose and one-time buyers, so you can treat each group differently.
It has been used in direct marketing for decades because it works with data every store already has: order dates and order values. No surveys, no tracking pixels.
What R, F and M mean
- Recency: how many days since the customer's last order. Recent buyers are far more likely to buy again.
- Frequency: how many orders the customer has placed in total, or within a set period.
- Monetary value: how much the customer has spent in total.
A customer who ordered last week, has ordered eight times and has spent 600 is a very different person from one who ordered once, 14 months ago, for 25. RFM puts a number on that difference.
How to do an RFM analysis, step by step
1. Pull your customer data
For each customer who has placed at least one order, you need three values: date of last order, number of orders and total spent. Leave out customer records with no orders, such as newsletter signups. They have no RFM values and will skew your groups.
2. Score each customer from 1 to 5 on each dimension
The usual method is to rank customers on each measure and split them into five equal groups (quintiles):
| Score | Recency | Frequency | Monetary |
|---|---|---|---|
| 5 | Most recent 20% | Most orders, top 20% | Highest spend, top 20% |
| 3 | Middle 20% | Middle 20% | Middle 20% |
| 1 | Least recent 20% | Fewest orders, bottom 20% | Lowest spend, bottom 20% |
Frequency often needs a tweak for ecommerce, because most stores have a large share of one-time buyers. If half of your customers have one order, you cannot split them into five equal frequency groups. Use fixed bands instead, for example 1 order, 2 orders, 3 to 4, 5 to 9 and 10 or more.
3. Combine the scores
Each customer ends up with a three-digit code. A customer scored R5 F5 M5 is "555", your best kind of customer. "111" bought once, long ago, and spent little.
There are 125 possible combinations, which is too many to act on. Group them into a few segments.
4. Group customers into segments
A common set of RFM segments:
| Segment | Typical scores | What it means | What to do |
|---|---|---|---|
| Champions | R5, F4 to 5, M4 to 5 | Recent, frequent, high spend | Early access, referrals, reviews. Do not over-discount. |
| Loyal | R3 to 5, F3 to 5 | Buy regularly | Loyalty rewards, cross-sell related products |
| New customers | R5, F1 | Just made a first order | A strong welcome series to earn the second order |
| At risk | R2 to 3, F3 to 5 | Used to buy often, now going quiet | Personal win-back offer, ask what changed |
| Can't lose them | R1 to 2, F4 to 5, M4 to 5 | High value but lapsed | Your highest-priority win-back campaign |
| Hibernating | R1 to 2, F1 to 2 | Bought once or twice, long ago | Low-cost reminders, or let them go |
Labels vary between tools, but the idea is the same everywhere: different customers need different messages.
Why RFM analysis matters for ecommerce
- Better email and SMS targeting. Sending the same campaign to everyone wastes discounts on Champions who would buy anyway, and is too weak to bring back lapsed customers.
- Smarter discounting. Save the biggest offers for at-risk and lapsed high-value customers, where they actually change behaviour.
- Early warning. Watching how many customers move from Loyal to At risk each month shows retention problems long before revenue drops.
- Better lookalike audiences. Champions are the best seed list for finding new customers who look like your best existing ones.
The limits of RFM
RFM describes past behaviour. It does not tell you why a customer stopped buying, and it treats all products the same, so a customer who buys one expensive item a year can look "lapsed" when they are behaving normally. If your products have a natural reorder cycle, measure recency against that cycle rather than in absolute days.
Doing RFM analysis with your own data
In a spreadsheet, RFM means exporting every customer and order, calculating three values per customer, ranking and scoring them, and then rebuilding it all next month.
If you connect your store to Ask AI, your AI assistant can do much of this for you from your Shopify data. Ask AI already sorts buyers into one-time, returning, VIP (5 or more orders) and at-risk (last ordered 90 days to 12 months ago), which covers the frequency and recency sides of RFM. It can rank your top customers by spend or order count, and list high-spending customers who have stopped ordering, the "can't lose them" group, ready for a win-back campaign. You can ask:
- "How many customers are one-time, returning, VIP and at risk right now?"
- "Which high-spending customers haven't ordered in the last 6 months?"
- "Who are my top 20 customers by total spend, and when did they last order?"
It works in Claude, ChatGPT, Gemini and Perplexity, and you can try the live demo without an account.
FAQ
What is RFM analysis?
A method of segmenting customers by recency (how recently they bought), frequency (how often they buy) and monetary value (how much they spend).
How do you calculate RFM scores?
Rank customers on each of the three measures and split them into five groups, scoring 5 for the best 20% and 1 for the lowest. Combine the three scores into a code such as 555 or 311, then group the codes into segments.
What are the most common RFM segments?
Champions, loyal customers, new customers, at risk, can't lose them and hibernating. Exact labels vary between tools.
Is RFM analysis still useful?
Yes. It only needs order dates and values, which every store has, and it is one of the quickest ways to stop sending the same message to every customer.