RFM analysis groups customers by recency, frequency, and monetary value. It tracks how recently they bought, how often they buy, and how much they’ve spent in total. These three measures help you decide who to contact and what to offer.
RFM scores show which customers to reward, which to win back, and which to guide after a first order.
This guide explains how RFM analysis works, how to calculate customer scores, and how to use those scores to plan campaigns for different groups of shoppers.
What is RFM analysis?
RFM analysis is a customer segmentation technique that uses purchase history to group shoppers. It’s a type of customer scoring model, a framework for ranking customers based on selected behavioral or value criteria. The RFM model measures three aspects of buying behavior:
| Measure | What it tells you |
|---|---|
| Recency (R) | How long it’s been since a customer’s last purchase. |
| Frequency (F) | How many purchases a customer made during the analysis period. |
| Monetary value (M) | How much a customer spent in total during that period—not their average order value. |
How does RFM analysis work?
RFM analysis assigns a score to each measure, then groups customers with similar scores. Scores reflect each customer’s position within your customer base. Higher scores indicate more recent purchases, more orders, or greater total spending.
Frequency and monetary value need a defined analysis window. Set that window around your typical purchase cycle. For example, a furniture retailer needs a longer view than a skincare brand selling monthly refills. Use the same period when comparing customers.
Why ecommerce businesses use RFM analysis
RFM is a behavioral customer segmentation method that groups customers by their purchase activity.
Demographic segments describe traits such as age or location, while RFM separates frequent buyers from one-time shoppers, even when they share traits. You can plan different follow-up campaigns for each group.
Develop more effective marketing campaigns
RFM segmentation gives you purchase evidence to guide your offers. You could:
- Invite high-value customers to a private sale
- Offer a subscription to customers who repeatedly buy the same replenishable product
- Recommend a matching accessory after a recent purchase
Use each customer’s order history to select products for an offer, then test which messages lead to repeat purchases.
In a February 2026 survey commissioned by Attentive, 93% of online shoppers in Australia, the UK, and the US said they were likely to keep shopping with a brand offering personalized experiences. Fifty-three percent named relevant product suggestions as a reason to stay. Respondents were already subscribed to email or SMS marketing.
Identify at-risk customers before they churn
A drop in an RFM score can flag a shopper at risk of customer attrition, especially when a regular buyer stops ordering. Check their purchase history before intervening, as rankings can also drop when other customers buy more, and a low purchase count doesn’t always signal churn. Speaking with Shopify Masters, Copper Cow Coffee Founder Debbie Wei Mullin asked fans why they’d bought their favorite coffee only twice in a year.
“It’s my special occasion coffee,” she says they told her. “It’s the gift I give.” Shopify Messaging lets you send email and SMS campaigns from your Shopify admin. To create an audience, open the RFM customer analysis report under Analytics > Reports, select a group, and click Preview segment.
Adapt how you follow up if you find:
- Falling recency. If a monthly buyer hasn’t ordered in three months, send a replenishment reminder. Shopify Messaging’s Win back customers automation sends an email after a specified time since the last order.
- Falling frequency. If monthly orders have slipped to quarterly, send subscribers a new-arrivals text. In Messaging, select Create campaign > SMS, then select the relevant customer segment.
- Falling spending. If total spending drops from $1,000 to $200 across comparable periods, ask what changed. Send that segment a short satisfaction survey through a Shopify Messaging email campaign.
In a January 2026 report from SimpleTexting, 47% of surveyed consumers named ecommerce and retail among the industries they were most likely to opt in to texts from.
Follow applicable laws and platform rules when you send commercial emails and SMS messages. For US commercial email, follow the FTC’s CAN-SPAM guidance, including accurate sender details, a postal address, and an unsubscribe option. For SMS, obtain the required consent and follow local sending-time and opt-out rules.
Better direct your marketing and sales spending
Use RFM segments to decide where to test expensive campaigns. For example, you could mail an offer to 2,000 previously loyal customers before committing to your full list of 10,000.
Under USPS prices, a qualifying domestic First-Class Mail postcard costs 65¢ at the retail rate. At that rate, postage for 2,000 postcards totals $1,300, compared with $6,500 for 10,000. These figures exclude design, printing, and mailing-service costs.
A smaller mailing doesn’t guarantee a lower cost per piece. Printing and setup charges are spread across fewer recipients, and reduced volume can change eligibility for postal discounts. Get quotes for both quantities before setting your budget.
RFM doesn’t measure customer profitability or explain why purchases stopped. Check margins and compare campaign results with a randomly selected group that receives no mailing. Compare the profit from retention campaigns with your customer acquisition cost before moving more budget toward either strategy.
How to calculate an RFM score
An RFM score summarizes a customer’s purchase recency, frequency, and total spending. It combines three component scores, so you can compare customers and assign them to marketing segments.
For a manual calculation:
- Set the analysis period. Select a window that captures repeat purchases, such as the past 12 months. Record the date you’ll measure recency from.
- Calculate each customer’s values. Count days since their last purchase for R, orders within the window for F, and total spending within that window for M. Use consistent rules for refunds and canceled orders.
- Assign scores. Rank customers separately for each measure. One approach splits the customer base into five roughly equal groups, scored 1 to 5. Keep tied values together.
- Create an RFM code. Write the scores in R–F–M order. Scores of 4, 3, and 5 produce 435. The digits describe separate behaviors, not the number four hundred thirty-five.
- Assign segments and refresh. Group similar patterns, then recalculate on a schedule that matches your purchase cycle. Compare the underlying values before acting on a score change.
The scale depends on the tool. For example, Shopify uses 1 to 5 for each measure, and Klaviyo uses 1 to 3. Check the platform’s thresholds and time period before comparing results.
A fictional store below uses these illustrative bands for a 12-month analysis.
| Score | Recency: days since purchase | Frequency: orders in 12 months | Monetary value: total spent in 12 months |
|---|---|---|---|
| 5 | 0–30 | 10 or more | $1,000 or more |
| 4 | 31–60 | 7–9 | $500–$999.99 |
| 3 | 61–90 | 4–6 | $250–$499.99 |
| 2 | 91–180 | 2–3 | $100–$249.99 |
| 1 | 181 or more | 1 | Less than $100 |
Here’s how four customers would score. Segment names follow Shopify’s grouping rules, but the customer data and scoring bands are illustrative.
| Customer | Days since purchase | Orders in 12 months | Total spent in 12 months | R | F | M | RFM code | Segment |
|---|---|---|---|---|---|---|---|---|
| Ava | 7 | 12 | $1,200 | 5 | 5 | 5 | 555 | Champions |
| Ben | 35 | 4 | $1,000 | 4 | 3 | 5 | 435 | Loyal |
| Cara | 10 | 1 | $40 | 5 | 1 | 1 | 511 | New |
| Diego | 240 | 10 | $1,100 | 1 | 5 | 5 | 155 | Previously loyal |
In a custom model, you could summarize 435 as a total of 12 or an average of 4: (4 + 3 + 5) ÷ 3. Keep the separate scores, since identical totals can describe different buying patterns.
Use each score pattern to plan a follow-up:
| Score pattern | Meaning | Recommended action |
|---|---|---|
| High R, F, and M, such as 555 | Recent, frequent buyer with high total spending | Offer early access to a new collection. |
| Strong R and M, moderate F, such as 435 | Recent, high-spending buyer who orders less often | Recommend a product based on previous purchases. |
| High R, low F and M, such as 511 | Recent buyer with little purchase history | Send product-use guidance after the first order. |
| Low R, high F and M, such as 155 | Former frequent buyer who hasn’t returned recently | Test a win-back offer based on past purchases. |
Shopify’s RFM customer analysis assigns 11 named groups: Prospects, New, Active, Promising, Needs attention, Loyal, Champions, Almost lost, At risk, Previously loyal, and Dormant.
It combines R with the average of F and M, rounded down. For 435, that’s R = 4 and FM = 4, placing the customer in Loyal. Prospects have no orders yet.
How to use RFM for customer segmentation
RFM segmentation uses three pieces of purchase data for each customer:
- Most recent order date. The date used to calculate how long it’s been since their last purchase.
- Total number of orders. The number of purchases within your analysis window.
- Total amount spent. Their combined spending within that same window.
Match these records to a consistent customer ID. Allow enough purchase history to develop repeat buying patterns. If almost everyone has ordered once, frequency scores offer little distinction between customers.
1. Choose your RFM analysis tool
For Shopify store owners, the built-in RFM customer analysis report is the default option. It scores customers automatically using your store’s purchase data.
Match the tool to your list size and needs:
| Tool option | When to use it |
|---|---|
| Platform-native reports | Use Shopify’s built-in report to review customer groups and their purchasing activity directly in your admin. |
| Spreadsheet | Use a spreadsheet for smaller customer lists when you want to inspect calculations or test scoring thresholds. Refresh the data before each analysis. |
| RFM app | Use an app when you need additional integrations or tagging features. Loyal, for example, automatically tags customers and syncs segments with Klaviyo. |
| Custom analysis | Work with an analyst when you need to combine data from separate systems or build scoring rules around a specific business model. |
For follow-up automation, Shopify Flow can trigger a workflow when someone joins a segment. For example, it can add a VIP tag when a customer enters your Champions segment.
2. Set up customer segment lists
Three scores on a 1 to 5 scale create 125 possible combinations: 5 x 5 x 5. Tools consolidate these combinations into named groups you can use for campaigns.
Shopify uses 11 RFM groups, including Prospects for customers who haven’t ordered. The examples below illustrate some of those groups.
| Shopify group | Example RFM code | Purchase pattern | Campaign to test |
|---|---|---|---|
| Champions | 555 | Very recent purchases, frequent orders, high total spending | Invite them to a product preview |
| Active | 433 | Recent purchases, moderate order count and spending | Recommend an accessory for a previous purchase |
| New | 511 | Very recent purchase, low order count and spending | Send product-use guidance |
| At risk | 244 | Older purchases, strong order count and spending | Send an offer based on a past purchase category |
| Previously loyal | 155 | Long purchase lapse, highest frequency and spending scores | Introduce a new release from their favorite collection |
Use Shopify’s customer segmentation features to refine these audiences. Under Customers > Segments, create a segment and combine the RFM group with additional filters. For example, limit a Champions segment to customers subscribed to marketing emails.
You can then send targeted email or SMS campaigns through Shopify Messaging, subject to channel eligibility and consent. You can also create a discount for a specific segment.
3. Track segment performance metrics
Track repeat purchases, average order value, and customer lifetime value for each segment. Shopify’s analytics fields include RFM group as a reporting dimension, which you can use in compatible reports to compare customer groups.
RFM and cohort retention analysis answer different questions. RFM classifies customers using their purchase history. Cohort analysis tracks whether customers acquired during the same period continue buying over time.
Compare campaign variants within the same segment. A VIP preview and a win-back discount reach customers with different buying histories, so their results alone won’t tell you which offer works better. Account for discounts and campaign costs when assessing returns.
There’s no set schedule for reviewing RFM segments. A monthly review can suit a monthly purchase cycle, while slower buying cycles can justify quarterly reviews. Check more often during major promotions. Shopify automatically updates the underlying RFM data as store data syncs, though recent activity may take time to appear.
Add Shopify’s predicted spend tier to compare past behavior with expected future spending. It classifies purchasing customers into high-, medium-, or low-tier groups. The feature is available after your store exceeds 100 sales. Use it to identify Active customers with high predicted spending potential for a loyalty campaign.
RFM analysis FAQ
What are the benefits of RFM analysis?
RFM analysis helps businesses tailor offers, identify customers who have stopped buying, and prioritize retention spending. It groups shoppers by purchase records, so a repeat buyer can receive a different campaign than a new customer. You can then test which offers encourage another purchase within each group.
What data is needed for RFM analysis?
To run an RFM analysis, you need a customer identifier, the most recent order date, the total order count, and the total amount spent within a defined analysis window. Calculate recency from a fixed reference date. Apply consistent rules for refunds and canceled orders, and ensure enough purchase history to develop repeat-buying patterns.
How do you interpret RFM scores?
Interpret RFM scores by reading them in order of recency, frequency, and monetary value. On a 1-to-5 scale, higher numbers indicate more recent purchases, more orders, and greater total spending. A 155 customer who buys frequently and spends heavily hasn’t purchased recently. Interpret each score against your store’s thresholds, since scoring conventions vary.
What is an example of RFM?
An example of RFM is a customer who bought seven days ago, placed 12 orders, and spent $1,200 over the past year. If each measure earns a 5 under your store’s scoring rules, their RFM code is 555. You could invite this customer to an early-access product launch.
How does RFM analysis differ from customer lifetime value (CLV)?
Unlike customer lifetime value (CLV), RFM ranks customers by past purchasing behavior. CLV measures or estimates a customer’s financial value over the relationship. RFM helps identify campaign audiences, and CLV informs how much you can afford to spend to acquire or retain them.








