Blast Analytics and Marketing

Analytics Blog

Supporting Leaders to EVOLVE
Category: Digital Analytics

How RFM Analysis Boosts Sales

July 6, 2016

From “big spenders” to “almost lost,” all customers have diverse needs and desires, and respond to your marketing campaigns in different ways.

As your business grows, segmenting your customers can significantly improve your marketing performance, making campaigns more relevant to more of your customers, ultimately increasing response rates and sales.

What is RFM Analysis?

RFM analysis is a customer segmentation technique that uses past purchase behavior to divide customers into groups.

RECENCY (R): Time since last purchase
FREQUENCY (F): Total number of purchases
MONETARY VALUE (M): Total monetary value

RFM analysis was first used by the direct mail industry more than four decades ago, yet it is still an effective way to optimize your marketing.

Benefits of RFM Analysis

  • Increased customer retention
  • Increased response rate
  • Increased conversion rate
  • Increased revenue

RFM Customer Segmentation

To perform RFM analysis, we divide customers into four equal groups according to the distribution of values for recency, frequency, and monetary value.

Four equal groups across three variables create 64 (4x4x4) different customer segments, which is a manageable number.

Note that you can use quintiles (five equal groups) for increased granularity, but managing and acting on 125 segments (5x5x5) is significantly more challenging.

Recency (R) Frequency (F) Monetary Value (M)
Quartile 1 (R=1) Quartile 1 (F=1) Quartile 1 (M=1)
Quartile 2 (R=2) Quartile 2 (F=2) Quartile 2 (M=2)
Quartile 3 (R=3) Quartile 3 (F=3) Quartile 3 (M=3)
Quartile 4 (R=4) Quartile 4 (F=4) Quartile 4 (M=4)


For example, let’s look at a customer who:

  • is within the group who purchased most recently (R=1)
  • is within the group who purchased most quantity (F=1)
  • is within the group who spent the most (M=1)

This customer belongs to RFM segment 1-1-1 (Best Customers), (R=1, F=1, M=1)

Below is a table with key RFM segments:

Segment RFM Description Marketing
Best Customers 111 Bought most recently and most often, and spend the most No price incentives, new products, and loyalty programs
Loyal Customers X1X Buy most frequently Use R and M to further segment
Big Spenders XX1 Spend the most Market your most expensive products
Almost Lost 311 Haven’t purchased for some time, but purchased frequently and spend the most Aggressive price incentives
Lost Customers 411 Haven’t purchased for some time, but purchased frequently and spend the most Aggressive price incentives
Lost Cheap Customers 444 Last purchased long ago, purchased few, and spent little Don’t spend too much trying to re-acquire

How to Perform an RFM Analysis

Simple 3 Step RFM analysis example to segment your customer database. To perform an RFM analysis, you need all your customer purchase history data. This is a file with all the transactions ever made by all of your customers.

This data is usually exported from your accounting software or a transactional database.

Step 1: Download the RFM-analysis scripts and sample files from Github.

Step 2: Prepare a .CSV file with all the orders, or use the template sample-orders.csv. Use the same column names!

order_date order_id customer grand_total
2016-01-01 US-52653 john 40
2016-01-02 US-52654 mary 70

Step 3:
Execute the script in the directory where you placed the orders file. The script takes three arguments:

>python -i sample-orders.csv -o rfm-segments.csv -d “2014-04-01”

  • orders file (-1 sample-orders.csv)
  • output file with the RFM segmentation (-o rfm-segments.csv)
  • the date the orders table was exported (-d “YYY-mm-dd”)

This will create the RFM segments in a .CSV file named rfm-segments.csv, or whatever you defined with the -o option.

Customer Recency Frequency Monetary Value RFM Class
Etha K. 4 days 58 orders $2869 1-1-1
Jerold Sporer 50 days 1 order $44 3-4-4
Annie Hettinger 47 days 2 orders $156 3-2-1


Interpreting the Data

Etha K. belongs to the “Best Customers” segment; she purchased recently (R=1), frequently buys (F=1), and spent the most (M=1).

Jerold Sporer is about to enter the “Lost Cheap Customers” segment; he hasn’t purchased in a while (R=3), bought few (F=4), and spent little (M=4).

Annie Hettinger is a type of “Almost Lost” customer. She hasn’t made a purchase for some time (R=3), she bought somewhat frequently (F=2), but she is in the group who spent the most (M=1).

With these simple RFM analysis steps, you segmented your customer database. Now, create a team activity to browse through the RFM segments and identify which are important for your business.

Or, create a custom Tableau dashboard, like the RFM analysis dashboard below, to visualize your data and enhance your decision making!


RFM Segmentation Dashboard

Take Your Email Marketing to a New Level with RFM Segmentation

Now it is time to enrich your customer email list with the RFM segmentation and take your email marketing to a higher level. Here is an RFM analysis step-by-step example:

  1. Select an RFM segment to focus on (Best Customers, Almost Lost, etc.)
  2. Create an hypothesis as to what would work best for this RFM segment
  3. Define a goal for this email campaign and RFM segment
  4. Setup email marketing conversion tracking
  5. Create an alternate email version, tailored to the RFM segment on which you are focusing
  6. Create an A/B testing email campaign, where the control group receives a generic version and the experiment group receives the RFM segment tailored email.
  7. Analyze results and iterate; do more of what works and less of what doesn’t.

Visit A/B testing instructions for Mailchimp and Vertical Response, or search this information in your favorite email marketing platform.

Closing Notes

RFM analysis is a business analytics technique that will drastically improve your marketing performance.

Keep your RFM customer segmentation updated by automating the process; the RFM Analysis Python script should get you most of the way there. We recommend that you update your RFM segmentation on a daily basis.

Share your RFM segmentation results with us, or contact us if you need assistance.

Hungry to learn more about RFM Analysis? This is an enjoyable read on RFM Migration Analysis using cluster analysis to identify migration patterns.

Joao Correia
About the Author

Joao Correia is the Director of Data Insights at Blast Analytics & Marketing. His mission is to improve business performance through data, actionable insights and thoughtful strategy.

Joao Correia has written on the Blast Digital Customer Experience and Analytics Blog.

We’re here to help with tips and insights on the following topics:

Data Management Digital Analytics Digital Experience Digital Transformation Marketing Activation User Privacy
HIPAA and Analytics White Paper CTA

Featured White Paper

Healthcare Analytics and HIPAA: Ways to Minimize Risk and Ensure Compliance

The rise in digital data and analytics adds complexity and risk for healthcare organizations. Those that don’t comply with data privacy requirements, including Health Insurance Portability and Accountability Act (HIPAA), could face heavy fines, civil action lawsuits, and even criminal charges. Not to mention loss of patient trust.

Download the White Paper

Ready To Do More With Your Data?

If you have questions or you’re ready to discuss how Blast can help you EVOLVE your organization, talk to an Analytics Consultant today.

Call 1 (888) 252-7866 or contact us below.