RFM Analysis & Customer Segmentation
Unlock customer insights with RFM analysis: segment customers by recency, frequency, and monetary value to boost loyalty, retention, and targeted marketing strategies.
| Alex Jost Founder of RetentionX · Feb 4, 2025 · 13-minute read |
What is RFM Analysis?
RFM analysis is a business metric that measures the value of customer relationships. RFM stands for recency, frequency & monetary. It looks at how recently a Shopify customer has made a purchase (recency), how often they make purchases (frequency), and how much they spend per purchase (monetary).
RFM analysis can your brand identify your best customers and focus your marketing campaigns on retaining and growing these relationships. When used correctly, RFM analysis can be an valuable tool for increasing customer loyalty and lifetime value.
|
RFM analysis provides valuable customer insights, enabling businesses to make informed marketing decisions by analyzing customer cohorts, visualizing RFM data, and leveraging customer behavior information.

Why is RFM segmentation important for customer retention for brands on Shopify?
By integrating RFM analysis into your brand’s strategy, you not only foster better relationships with your customers but also steer your Shopify store towards a path of sustainable growth. It brings a data-driven approach to understanding customer behavior – based on recency, frequency and monetary value, helping to refine marketing strategies and make informed business decisions. This, in turn, enhances the overall health and profitability.
Better Customer Segments: Personalization allows for targeted and personalized marketing campaigns, enhancing customer experience and fostering brand loyalty. Identifying and targeting repeat customers is crucial for refining customer segments, as it helps in recognizing those who contribute significantly to your business through frequent purchases. This approach aids in the efficient allocation of marketing resources by focusing on cohorts of customers that are more likely to respond positively.
Improve Customer Lifetime Value: Knowing the LTV helps in budgeting, marketing, and understanding customer behavior.
Increase Customer Retention: By segmenting Shopify customers based on their customer lifetime value, companies can craft personalized strategies to retain high-value customers and improve the value of lower-value customer segments.
Better Cost Efficiency: By segmenting customers based on their customer lifetime value, companies can craft personalized strategies to retain high-value customers and improve the value of lower-value customer segments.
Enhanced Product Development: By segmenting customers based on their LTV, companies can craft personalized strategies to retain high-value customers and improve the value of lower-value customer segments.
– Shopify does not provide RFM analysis & RFM segmentation out of the box. RetentionX adds this functionality.
Understanding RFM segmentation: The RFM Model
Recency (R)
Definition: Measures the time since a customer's last purchase.
Importance: Identifying recent customers can help you retain them, as a client who recently made a purchase is more likely to buy again compared to one who hasn't bought anything for a long time.
Frequency (F)
Definition: Reflects how often a customer buys from your store.
Importance: Clients who purchase frequently are generally more engaged and potentially more loyal, indicating a stronger likelihood to respond to new offerings or promotions.
Monetary (M)
Definition: Represents the total money (net revenue after returns) a customer has spent in your store.
Importance: Shopify customers who have spent a higher amount are often more valuable to your business, providing insights into customer segments that might be more receptive to upselling or cross-selling opportunities.
RFM Analysis Example
Let’s take a look at the sample data set below including 12 different customers. Analyzing this data set can offer valuable repeat customer insights, helping to understand customer behavior trends over time.
Step 1: Sort your customers according to the RFM factors
First of all, we need to calculate per customer how many days have passed since the last order (Recency), how many orders they have placed (Frequency), and the monetary value they generated. We recorded this information in the following table:
Step 2: Score each customer according to position
To conduct RFM analysis for this example, let’s see how we can score these customers by ranking them based on each RFM factor separately. Let’s begin with ranking customers on recency first and score all customers from 1-4.
As seen in the table below, we have sorted customers by recency, with the most recent purchasers at the top. Once the numbers are sorted, you will separate your customer data into quartiles, 4 equal groups of 25%. The top 25% of customers (customers 7, 2, 10) receive a recency score of 1, the next 25% (the next 3 customers 8, 11, 1) a score of 2, and so on. These recency scores are summarized below:
Similarly, we can then sort customers by frequency from most to least frequent, assigning the top 25% a frequency score of 1, etc. For the monetary value, the top 25% of customers will be assigned a score of 1 and the lowest 25% a score of 4.
The RFM analysis is always a relative analysis that compares customers against each other. No thresholds are defined for assigning a score to a customer.
Step 3: Determine the RFM score
After we have sorted and assigned scores to each factor, you will be able to determine each customer's RFM score by combining each individual score as seen in the last column below:
Fantastic! Now we've completed the analysis.
Performing this analysis manually not only demands a considerable investment of time and resources but also bears the risk of human errors that can skew insights and lead to misguided strategies. Moreover, the dynamic nature of customer data requires constant updating and refinement. RetentionX can automate this process, continuously updating the data to provide real-time insights.
How to calculate RFM scores in a spreadsheet
If you want to reproduce the example on your own data, one row per customer is enough. Assume column C holds the last order date, D the number of orders and E net revenue:
Recency (days):
=TODAY()-C2, stored in column F.R score (fewer days = better = 1):
=IF(F2<=QUARTILE(F$2:F$5000,1),1,IF(F2<=QUARTILE(F$2:F$5000,2),2,IF(F2<=QUARTILE(F$2:F$5000,3),3,4)))F score (more orders = better = 1):
=IF(D2>=QUARTILE(D$2:D$5000,3),1,IF(D2>=QUARTILE(D$2:D$5000,2),2,IF(D2>=QUARTILE(D$2:D$5000,1),3,4)))M score: same formula as F, applied to column E.
RFM code:
=G2&H2&I2, combining the three scores into a code like "112".
Worked example: a customer who last ordered 12 days ago, has placed 6 orders and spent $540 lands in the best quartile on all three if most of your customers bought longer ago, ordered fewer times and spent less. Their RFM code is 111. A customer who ordered once, 300 days ago, for $35 will usually come out at 444.
One practical note: in many stores most customers have exactly one order, so frequency quartiles collapse. If that happens, use fixed frequency buckets (1, 2, 3–4, 5+ orders) instead of quartiles.
Customer Segmentation Using RFM to Enhance Customer Lifetime Value
After ranking our customers based on the recency, frequency, and monetary, we have individual R, F, and M scores; by combining their individual R, F, and M scores, we get the aggregated RFM score per customer.
Up to 64 different combinations of RFM scores are possible. However, to help you get started, we recommend the following predefined RFM statuses:
Top Customers – RFM score of 111:Most valuable customers: made the highest amount of purchases, with the least days since last order and the highest monetary value. Often also called VIP Customers or Champion Customers
Loyal Customers – RFM score of X1X:Customers that made a great number of purchases. This segment does not indicate performance regarding days since the last order or monetary value.
High Potentials – RFM score of XX1:Customers that made had a great AOV along their lifecycle. This segment does not indicate performance regarding days since the last order or number of orders in their lifecycle.
Small Buyers – RFM score of X13 or X14:Customers that place few orders will have a small monetary value. This segment does not indicate performance regarding days since the last order.
Dormant Customers – RFM score of 44X:Customers that placed few orders a long time ago. This segment does not indicate performance regarding the monetary value of those orders.
Worst Customers –RFM score of 444:Customers that placed few orders, a long time ago, with small monetary value.
Other:Customers who do not fall under the specifications above will be categorized as Other. All shopify customers are assigned an RFM score; however, not all scores have a predefined RFM status. You can create custom segments based on the RFM scores using our segment builder!
Once every customer has an RFM Score assigned, it is time to see the percentage of your database that belongs to each group. In this report, you will be able to see how many customers (both in absolute numbers and percentages) are within each score combination - that will give a look over your customer base's health!

Strategy Development and Implementation for VIP Customers
Instead of analyzing your entire customer base as a whole, RFM analysis is a powerful tool to segment customers into homogeneous groups, understand the traits of each group, and engage them with relevant campaigns. By knowing your customer distribution per RFM, you can identify and address potentials and risks in your customer structure:
Top Customers: Reward most valuable customers with unexpected benefits
Loyal Customers: Provide the highest level of customer service to transform them into Top Customers
Top Customers: Encourage them to place the next order, e.g. by using vouchers or goodies
High Potentials: Offer other relevant products and special discounts
Small Buyers: Reactivate them by an explicit reconnection
Worst Customers: Revive the interest of lost customers with a reach-out campaign, otherwise ignore them
Before you put a rewards budget behind your Top Customers, check whether rewards change their behavior or just pay customers who were already loyal. That is the core of measuring loyalty program ROI.
To do so, create segments and identify all customers belonging to an RFM status, e.g. all your Top Customers.

Alternatively, you can segment customers with our one-click segmentation suggestions.
Independent of our predefined RFM statuses, you can define your own RFM segmentation. When creating a new customer segment, simply combine the individual RFM scores as needed.
You can also use RFM to better acquire new customers by creating lookalike audiences of your top customer segments.
Before you size a VIP budget, check how concentrated your revenue is. If your top 1% of customers bring in a quarter of revenue, those few hundred people need their own plan. Here is how to measure customer concentration by percentile band.
With the help of RetentionX's built-in integrations to all marketing channels, you can synchronize segments to Meta, Google, Tiktok, Klaviyo (email marketing) and many other platforms to either acquire similar new customers or target and reactivate your existing customer segments.
RFM segments and what to do with each: action chart
Most RFM guides stop at the definition of each segment. This chart adds what to send, what to avoid and which number tells you whether it worked. Codes follow this guide's convention (1 = best, 4 = worst; X = any score).
| Part 2 · Do it yourself |
How to do RFM analysis in Shopify, step by step
Export customers and orders. Shopify's customer export includes total orders and total spent per customer. Add the last order date from an orders export.
Use net revenue. Subtract refunds and returns before scoring Monetary, otherwise serial returners look like VIPs.
Score R, F and M with the spreadsheet formulas above and build the RFM code.
Map codes to segments using the RFM statuses in this guide (Top Customers 111, Loyal X1X, High Potentials XX1, Dormant 44X and so on).
Recreate the segments in Shopify. The customer segment editor can approximate them with filters such as
last_order_date,number_of_ordersandamount_spent, or you can tag customers via import.Run one campaign per segment and re-score monthly. RFM codes drift as customers age, and a Top Customer who goes quiet is your most valuable reactivation target.
RFM analysis vs. cohort analysis
RFM and customer cohort analysis answer different questions. RFM is a snapshot: who are my best and most at-risk customers right now? Cohorts are a trend: are customers acquired this quarter behaving better or worse than last quarter's? Use cohorts to judge acquisition quality and RFM to decide who gets which message. Both feed into customer-based revenue forecasting, where recency and frequency drive the expected value of every customer.
Common RFM segmentation mistakes
Mixing up score directions. Some tools score 5 as best, others (like this guide) 1 as best. Check before comparing reports.
Ignoring the purchase cycle. 60 days since last order is alarming for coffee and normal for furniture. Read recency against your replenishment time.
Scoring on gross revenue. Returns and discounts distort Monetary.
Treating every 111 the same. A handful of customers can carry a large share of revenue. Check your customer concentration and look at who your VIPs actually are.
Scoring once. RFM is only useful if it is refreshed regularly.
FAQ: RFM analysis and RFM segmentation
|