Most online stores send the same email to every subscriber and run the same retargeting ads to every past buyer. The customer who has ordered eight times this year gets the same "Welcome back, here's 15% off" as the person who bought one discounted item two years ago. One of them did not need the discount; the other probably will not open the email.
RFM segmentation fixes that with data you already have. It ranks every customer on three things: how recently they bought, how frequently they buy and how much money they spend. Combine the three and you can separate your best customers from the ones about to lapse, and the bargain hunters from the big spenders, without surveys or third-party data.
This guide shows how to calculate RFM scores in a spreadsheet step by step, how to turn 125 possible score combinations into a handful of usable segments, what to send each segment, how to do it inside Shopify, Klaviyo and similar tools, and how to track customers moving between segments so you can see whether your retention work is paying off.
Why recency, frequency and money predict behaviour better than demographics
RFM grew out of catalogue and direct-mail marketing, where every printed catalogue had a real cost and mailers needed to know which customers were worth sending one to. The insight that held up for decades is simple: past purchase behaviour predicts future purchase behaviour better than age, gender or postcode.
- Recency is usually the strongest single predictor. Someone who bought last week is far more likely to buy again soon than someone who bought last year, regardless of how much either spent.
- Frequency shows habit and loyalty. A customer with five orders has demonstrated they come back; a one-time buyer has not.
- Monetary value shows the stakes. It helps you decide how much effort or discount a customer justifies.
Demographics tell you who someone is; RFM tells you what they have actually done with your brand. The two work well together. Our guide to psychographic segmentation covers the "why" behind purchases, while RFM covers the "how much and how often". Whatever segmentation you use, Semrush's advice on segment research applies here too:
“To avoid errors, cross-check various data points.”
— Semrush, Psychographic Segmentation: Definition, Examples and How to Use It
For RFM, that means checking your scores against reality: do your "champions" actually have high repeat rates next quarter? If not, your thresholds need adjusting.
Calculating RFM scores in a spreadsheet, step by step
You need one export: every order in your chosen window with customer ID (or email), order date and order value net of refunds. Shopify, WooCommerce, BigCommerce and most CRMs can export this as CSV. Then:
- Pick an analysis date. Usually today. Put it in a cell, for example
H1. - Build a customer table. Use a pivot table (or
UNIQUE()in Google Sheets) to list each customer once, with three columns: last order date (MAXof order date), number of orders (COUNT) and total net spend (SUM). - Calculate recency in days.
=$H$1 - B2where B2 is last order date. Lower is better. - Score each dimension 1 to 5. For frequency and money, higher is better:
=MIN(5, 1 + INT(PERCENTRANK.INC(C$2:C$5000, C2) * 5)). For recency, reverse it:=6 - MIN(5, 1 + INT(PERCENTRANK.INC(D$2:D$5000, D2) * 5)). - Handle frequency ties. In most stores the majority of customers have exactly one order, so quintiles break down. Use fixed bands instead, for example 1 order = 1, 2 = 2, 3 = 3, 4–5 = 4, 6+ = 5.
- Combine the scores. Create an RFM code with
=E2&F2&G2(for example "545") and, optionally, a simple sum or a weighted score such as=E2*0.5 + F2*0.3 + G2*0.2if recency matters most for your business. - Map codes to named segments using a lookup table (see the next section) with
XLOOKUPorVLOOKUP. - Sanity-check. Count customers and revenue per segment. If 40% of customers are "champions", your thresholds are too generous.
If your data is in BigQuery or a SQL database, NTILE(5) OVER (ORDER BY ...) does the same scoring in one query. Our guide to Google Sheets for marketers covers pivot tables and lookups if you are building this for the first time.
Choosing between quintiles and business-rule thresholds
Quintiles guarantee roughly equal-sized groups but shift every time you rerun them, so a "5" in recency might mean 20 days in January and 35 days in July. Business-rule thresholds are tied to your purchase cycle and stay stable.
| Score | Recency (days since last order) | Frequency (orders in 24 months) | Monetary (net spend in 24 months) |
|---|---|---|---|
| 5 | 0–30 | 6+ | £600+ |
| 4 | 31–90 | 4–5 | £300–599 |
| 3 | 91–180 | 3 | £150–299 |
| 2 | 181–365 | 2 | £60–149 |
| 1 | 366+ | 1 | Under £60 |
Example thresholds for a hypothetical skincare store with a typical 60-day replenishment cycle. Set yours from your own median time between orders and your average order value; our guide to average order value explains how to calculate it correctly.
Turning 125 score combinations into segments you can act on
Three dimensions with five scores each produce 125 combinations, which is far too many to market to. Group them into eight to eleven named segments. The names below are widely used, but the exact rules are yours to set.
| Segment | Typical rule (R, F, M) | What it means | Primary goal |
|---|---|---|---|
| Champions | R 5, F 4–5, M 4–5 | Bought recently, often and spend the most | Reward, advocacy, early access |
| Loyal customers | R 3–5, F 4–5 | Buy regularly, respond to offers | Upsell, loyalty programme |
| Potential loyalists | R 4–5, F 2–3 | Recent customers with a second or third order | Encourage the habit |
| New customers | R 5, F 1 | First order recently | Onboard, drive the second purchase |
| Big spenders, infrequent | F 1–2, M 5 | High-value one-off buyers | Personal follow-up, complementary products |
| Needs attention | R 3, F 3, M 3 | Average on all three, drifting | Relevant content and limited offers |
| At risk | R 2, F 3–5, M 3–5 | Used to buy often, now quiet | Win-back before it is too late |
| Can't lose them | R 1–2, F 5, M 5 | Former champions who have gone silent | Personal outreach, strong incentive |
| Hibernating | R 1–2, F 1–2, M 1–2 | Low-value, long-lapsed | Low-cost reactivation or suppression |
Two practical rules: every customer should land in exactly one segment (order your rules from most to least specific), and each segment should be big enough to justify its own campaign. If "can't lose them" holds 12 people, handle them by hand.
What to send each segment by email, SMS and paid ads
The point of segmentation is different treatment. Here is a practical playbook.
Champions and loyal customers: protect margin, ask for advocacy
- Do not discount by default. Offer early access to launches, members-only bundles or free upgrades instead.
- Invite them into referral and review programmes. Be careful with incentives: under the FTC's rule, a reward must not depend on the review being positive.
- Use them as a seed audience for lookalikes, which often perform better than lookalikes built from all purchasers.
“The rule authorizes courts to impose civil penalties for knowing violations.”
— Federal Trade Commission, Consumer Reviews and Testimonials Rule: Questions and Answers
The same caution applies if champions post about you on social media in exchange for free products: the FTC's Endorsement Guides Q&A expects that relationship to be disclosed.
New customers and potential loyalists: earn the second order
- The jump from one order to two is where most customer value is won or lost. Build a post-purchase flow that teaches product use, then recommends a logical next item. Our guide to post-purchase emails has templates.
- Time the replenishment reminder from your median repeat interval, not a guess.
At-risk and can't-lose customers: intervene early
- Trigger win-back messages when a customer crosses from R3 to R2, not after a year of silence. See our win-back campaigns guide for sequence timing.
- Ask why. A one-question survey ("What would bring you back?") often reveals a delivery or product problem worth more than a coupon.
- For high-value lapsed customers, a personal email from the founder or a customer service call can outperform any automated flow.
Hibernating customers: decide whether to spend at all
- Run one low-cost reactivation attempt, then suppress non-responders from frequent sends. This protects deliverability and lowers ad costs.
- Exclude them from expensive retargeting; they are often cheaper to treat as cold prospects.
For paid media, upload segment lists to Google Ads Customer Match and Meta custom audiences where you have consent, then exclude champions from acquisition campaigns and give at-risk customers their own creative. Our email marketing team regularly builds these flows for stores.
RFM inside Shopify, Klaviyo and other ecommerce tools
You do not have to maintain a spreadsheet forever. Several platforms now calculate RFM-style groups for you, though the details (and which plan includes them) change often, so check your own account.
| Tool | What it offers | Things to watch |
|---|---|---|
| Shopify customer segments | The segment editor includes RFM-based customer groups and filters on order count, amount spent and last order date | Group definitions are Shopify's, not yours; compare them with your own thresholds |
| Klaviyo | RFM analysis and predictive fields (such as expected next order date and predicted CLV) where your plan and data volume allow | Predictive fields need enough order history; check which features your plan includes |
| Spreadsheet or BigQuery | Full control of thresholds, weighting and history | Needs a refresh routine; sync results back as tags or list memberships |
| CRM (HubSpot, Salesforce and similar) | Calculated properties for last purchase, order count and revenue, used in lists and workflows | Requires reliable order sync from the store |
A pragmatic setup for small stores: compute scores monthly in a sheet, write the segment name back to each customer as a tag (Shopify) or profile property (Klaviyo), and build flows that trigger on tag changes. Larger stores with a data warehouse can schedule the SQL version and push segments through a reverse-ETL tool. Our CRM for marketing guide covers the sync side.
A worked example: scoring 4,000 customers for a coffee subscription brand
Hypothetical example. A coffee brand has 4,000 customers who ordered in the past 12 months. After scoring with business-rule thresholds based on a 30-day buying cycle, the team finds:
- Champions: 320 customers (8%) generating 31% of revenue.
- Loyal and potential loyalists: 900 customers (22.5%), 38% of revenue.
- New customers: 700 customers (17.5%), 9% of revenue.
- At risk and can't lose them: 480 customers (12%), 14% of revenue, most of it from the past rather than recent months.
- Hibernating and others: 1,600 customers (40%), 8% of revenue.
Previously, every customer received the same monthly 10% discount. The team changes three things: champions get early access to single-origin releases with no discount, at-risk customers get a "we miss you" email triggered at 45 days without an order plus a survey, and hibernating customers drop from weekly to monthly sends. The decision is driven by margin arithmetic: if 320 champions each place an average £25 order monthly, a 10% discount costs about £800 a month in margin they would probably have spent anyway.
After the change, the team watches not just revenue but movement: how many customers moved from at risk back to loyal, and how many new customers became potential loyalists within 60 days. That movement is the real measure of retention marketing, which leads to the next section.
Tracking how customers move between segments over time
A single RFM snapshot is useful; a series of snapshots is much more useful. Rerun the scoring on the same day each month and save the segment for each customer with the date. Then build a transition matrix: rows are last month's segment, columns are this month's.
- Export last month's and this month's segment for each customer ID.
- Create a pivot with previous segment as rows, current segment as columns and count of customers as values.
- Calculate row percentages: of everyone who was at risk last month, what share is now loyal, still at risk or hibernating?
- Track three headline rates monthly: new to potential loyalist (second-order rate), at risk to active (win-back rate) and champion to at risk (champion churn).
- Annotate the chart when you launch a campaign so you can connect changes to actions.
This approach connects naturally to cohort analysis, which tracks groups by when they were acquired. Together they show whether newer customers are better or worse than older ones, and whether your retention work moves people up the ladder. They also feed into broader customer retention and customer lifetime value work.
When RFM misleads you
- Seasonal businesses: a Christmas-only gift buyer looks "at risk" every March. Compare recency with the same point last year, and read our guide to gift guides and gift cards for keeping gift buyers engaged.
- Refunds and returns: use net revenue, or a heavy returner will look like a champion.
- Discount-driven buyers: high frequency driven only by promotions may be unprofitable. Add an average-discount column and check margin, as our ecommerce unit economics guide explains.
- Guest checkouts: the same person under two emails splits into two weak customers. Deduplicate before scoring.
Questions store owners ask about RFM segmentation
How many customers do I need before RFM is worth doing?
Once you have a few hundred customers with at least one order, scoring becomes useful. Below that, simply sort customers by last order date and total spend and talk to the top ones personally.
Should I use quintiles (1 to 5) or fixed thresholds?
Quintiles are quick and self-adjusting, which suits a first analysis. Fixed thresholds based on your purchase cycle (for example, recency under 45 days = 5) are easier to explain and keep segment meaning stable over time, so most stores move to them after the first quarter.
What time window should RFM cover?
Use at least two typical purchase cycles. A coffee subscription brand might look back 12 months; a furniture store may need 36 months to see repeat behaviour at all.
Is RFM the same as customer lifetime value?
No. RFM describes past behaviour in three dimensions; customer lifetime value estimates future value. RFM scores are often used as inputs to a simple CLV model, and the two together tell you both who is valuable and who is slipping.
Can I use RFM for B2B or services businesses?
Yes, if there are repeat transactions. Replace orders with invoices, renewals or bookings. For contract businesses with one annual invoice, engagement-based recency (logins, tickets, meetings) is often more informative than purchase recency.
Does RFM work with privacy rules like GDPR?
RFM uses transactional data you already hold to run your business, but you still need a lawful basis for marketing use, an accurate privacy notice and respect for opt-outs. Uploading segments to ad platforms needs consent where the law requires it.
Your first RFM analysis in an afternoon
Export 24 months of orders, build the customer table, score with the fixed bands above and name nine segments. Then pick just two actions for this month: stop discounting to champions, and start a win-back trigger for customers who cross into at risk. Rerun next month and look at the movement.
If you want help connecting segments to email, SMS and paid media, our ecommerce SEO and marketing team can audit your data and set up the flows. Request a custom quote and tell us which platform you use.
Further reading on RFM segmentation
- Gift Guides and Gift Cards: Boost Holiday and Year-Round Sales
- Size Guides and Fit Tools: Cut Returns in Fashion Ecommerce
- Magento SEO: A Setup Guide for Magento 2 and Adobe Commerce




