Segmentation

RFM Analysis

Segment customers by Recency, Frequency, and Monetary value to identify your most valuable customers and optimise marketing strategies.

What is RFM Analysis?
A proven customer segmentation technique based on purchase behavior

RFM (Recency, Frequency, Monetary) analysis is a marketing technique used to quantitatively rank and group customers based on their transaction history. Developed in the direct marketing industry decades ago, RFM remains one of the most effective and widely-used segmentation methods because it's simple, actionable, and directly tied to revenue outcomes.

The power of RFM lies in its behavioral foundation. Rather than relying on demographic assumptions or declared preferences, RFM segments customers based on what they've actually done: when they last purchased (Recency), how often they purchase (Frequency), and how much they spend (Monetary). These three dimensions capture the most predictive indicators of future customer behavior and lifetime value.

RFM analysis enables marketers to answer critical questions: Who are my best customers? Who is at risk of churning? Which customers have the highest potential for growth? By scoring customers on each dimension and combining those scores into segments, businesses can tailor marketing strategies, allocate resources efficiently, and maximise customer lifetime value.

Understanding the RFM Components
Breaking down Recency, Frequency, and Monetary dimensions
ComponentDefinitionMeasurementWhy It MattersScoring
Recency (R)How recently a customer made a purchaseDays since last purchaseRecent customers are more likely to respond to marketing and make repeat purchases5 = Most recent, 1 = Least recent
Frequency (F)How often a customer makes purchasesNumber of transactions in time periodFrequent buyers demonstrate loyalty and engagement with your brand5 = Most frequent, 1 = Least frequent
Monetary (M)How much money a customer spendsTotal or average purchase valueHigh-value customers contribute most to revenue and have highest lifetime value5 = Highest spend, 1 = Lowest spend
Standard RFM Segments
Common customer segments derived from RFM scores with recommended strategies
SegmentRFM Score RangeCharacteristicsMarketing StrategyPriority
Champions555, 554, 544, 545Bought recently, buy often, spend the mostReward them, ask for reviews, upsell premium productsHighest
Loyal Customers543, 444, 435, 355Buy regularly, responsive to promotionsRecommend related products, engage with loyalty programsHigh
Potential Loyalists553, 551, 552, 541Recent customers with average frequency and spendOffer membership programs, recommend productsHigh
Recent Customers512, 511, 422, 421Bought recently but not frequentlyProvide onboarding support, build relationshipsMedium-High
Promising525, 524, 523, 522Recent shoppers with moderate frequencyCreate brand awareness, offer free trialsMedium
Customers Needing Attention535, 534, 443, 434Above average recency, frequency, and monetaryMake limited-time offers, recommend productsMedium
About to Sleep331, 321, 312, 221Below average recency, frequency, and monetaryWin-back campaigns, special offersMedium
At Risk255, 254, 245, 244Spent big money, purchased often, but long time agoSend personalised emails, offer renewals, provide helpful resourcesHigh
Can't Lose Them155, 154, 144, 145Made biggest purchases, but haven't returned for a long timeWin them back via surveys, special offers, personalised outreachHighest
Hibernating332, 322, 231, 241Last purchase was long ago, low frequency and spendOffer relevant products, special discounts, reactivation campaignsLow-Medium
Lost111, 112, 121, 131Lowest recency, frequency, and monetary scoresRevive with aggressive discounts or ignore to reduce costsLow
RFM Implementation Guide
Step-by-step process for conducting RFM analysis
StepDescriptionExample
1. Define Time PeriodChoose analysis window (typically 12 months for most businesses, shorter for high-frequency purchases)E-commerce: 12 months, SaaS: 6 months, Grocery: 3 months
2. Calculate MetricsFor each customer, calculate recency (days since last purchase), frequency (number of purchases), monetary (total spend)Customer A: Recency = 15 days, Frequency = 8 purchases, Monetary = $2,400
3. Score Each DimensionDivide customers into quintiles (5 groups) for each metric, assign scores 1-5Top 20% recency = 5, next 20% = 4, etc.
4. Combine ScoresConcatenate R, F, M scores to create RFM code (e.g., 543 = R:5, F:4, M:3)Customer A with scores R:5, F:4, M:5 = RFM code 545
5. Segment CustomersGroup RFM codes into strategic segments based on business logic555, 554, 544, 545 = Champions segment
6. Develop StrategiesCreate targeted marketing campaigns for each segmentChampions: VIP program, At Risk: Win-back email series
7. Monitor and IterateTrack segment migration, campaign performance, and adjust strategiesTrack how many 'At Risk' customers move to 'Loyal' after win-back campaign
RFM Calculation Example (SQL)
Sample SQL query for calculating RFM scores
-- Calculate RFM metrics for each customer
WITH rfm_metrics AS (
  SELECT 
    customer_id,
    DATEDIFF(CURRENT_DATE, MAX(order_date)) AS recency,
    COUNT(DISTINCT order_id) AS frequency,
    SUM(order_total) AS monetary
  FROM orders
  WHERE order_date >= DATE_SUB(CURRENT_DATE, INTERVAL 12 MONTH)
  GROUP BY customer_id
),

-- Score each dimension using NTILE for quintiles
rfm_scores AS (
  SELECT 
    customer_id,
    recency,
    frequency,
    monetary,
    -- Lower recency is better, so reverse the score
    6 - NTILE(5) OVER (ORDER BY recency) AS r_score,
    NTILE(5) OVER (ORDER BY frequency) AS f_score,
    NTILE(5) OVER (ORDER BY monetary) AS m_score
  FROM rfm_metrics
)

-- Combine scores and assign segments
SELECT 
  customer_id,
  recency,
  frequency,
  monetary,
  r_score,
  f_score,
  m_score,
  CONCAT(r_score, f_score, m_score) AS rfm_code,
  CASE 
    WHEN CONCAT(r_score, f_score, m_score) IN ('555','554','544','545') THEN 'Champions'
    WHEN CONCAT(r_score, f_score, m_score) IN ('543','444','435','355') THEN 'Loyal Customers'
    WHEN CONCAT(r_score, f_score, m_score) IN ('553','551','552','541') THEN 'Potential Loyalists'
    WHEN CONCAT(r_score, f_score, m_score) IN ('155','154','144','145') THEN 'Can\'t Lose Them'
    WHEN CONCAT(r_score, f_score, m_score) IN ('255','254','245','244') THEN 'At Risk'
    WHEN CONCAT(r_score, f_score, m_score) IN ('331','321','312','221') THEN 'About to Sleep'
    WHEN CONCAT(r_score, f_score, m_score) IN ('111','112','121','131') THEN 'Lost'
    ELSE 'Other'
  END AS segment
FROM rfm_scores
ORDER BY r_score DESC, f_score DESC, m_score DESC;
Advanced RFM Techniques
Enhancements and variations of traditional RFM analysis
TechniqueDescriptionUse Case
Weighted RFMAssign different weights to R, F, M based on business prioritiesSaaS companies might weight Recency higher than Monetary for engagement focus
RFM with Additional VariablesAdd dimensions like product category, channel preference, or engagement scoreRFME (adding Engagement) for content-heavy businesses
Predictive RFMUse machine learning to predict future RFM scores and segment migrationIdentify customers likely to churn before they show behavioral signals
Dynamic ScoringAdjust scoring thresholds based on seasonality or business changesRetail businesses adjusting for holiday shopping patterns
Channel-Specific RFMCalculate separate RFM scores for different channels (online, in-store, mobile)Omnichannel retailers understanding cross-channel behavior
RFM Analysis Best Practices

1. Choose the Right Time Window

The analysis period should match your purchase cycle. High-frequency businesses (grocery, fast food) use shorter windows (3-6 months), while low-frequency businesses (furniture, cars) use longer windows (12-24 months). Test different windows to find what best predicts future behavior.

2. Adjust for Business Model

Subscription businesses might replace Frequency with "months subscribed" and Monetary with "MRR." B2B companies might weight Monetary higher than Frequency. Customize RFM dimensions to match your business model and what drives customer value.

3. Refresh Scores Regularly

Customer behavior changes over time. Recalculate RFM scores monthly or quarterly to keep segments current. Automated scoring pipelines ensure segments stay fresh and campaigns remain relevant.

4. Track Segment Migration

Monitor how customers move between segments over time. Are "At Risk" customers being successfully reactivated? Are "Potential Loyalists" converting to "Champions"? Segment migration metrics reveal campaign effectiveness and customer lifecycle health.

5. Combine with Other Data

RFM is powerful but not comprehensive. Layer in demographic data, product preferences, channel behavior, and engagement metrics for richer segmentation. Use RFM as the foundation and add context for more nuanced strategies.

6. Test and Measure Campaign Impact

Run A/B tests within segments to validate strategies. Does offering discounts to "At Risk" customers improve retention? Do "Champions" respond better to exclusive access or monetary rewards? Let data guide your segment-specific tactics.

7. Align with Customer Lifetime Value

RFM scores should correlate with CLV. Validate that your "Champions" segment actually has the highest lifetime value. If not, adjust your scoring methodology or segment definitions to better align with business outcomes.

RFM Limitations and Considerations

Backward-Looking

RFM is based on historical behavior and may not predict future actions for customers whose circumstances have changed. Combine with predictive models for forward-looking insights.

Doesn't Capture Intent

RFM doesn't explain why customers behave as they do. A low-frequency customer might be satisfied but have infrequent need, not low engagement. Supplement with surveys and qualitative research.

New Customer Challenge

New customers lack sufficient history for accurate RFM scoring. Create separate onboarding segments for recent customers until they accumulate enough transaction data.

Product Diversity Issues

Customers buying different product categories may have different RFM patterns. Consider category-specific RFM analysis for businesses with diverse product lines.