How to apply RFM Customer Segmentation to Your Business right now!
Tags: machinelearning, computerscience, datascience, database
Published: 2020-07-15 07:54:58

RFM analysis is a handy method to find your best customers, understand their behavior and then run targeted email / marketing campaigns to increase sales, satisfaction and customer lifetime value.

## How RFM analysis becomes useful?

As you may have already understood, the RFM matrix serves precisely to identify the potential hidden in our customer database.

## RFM makes identifying customer groups easy.
RFM considers recency, frequency and monetary values for each customer. Combines them, and then groups them into different customer segments for easy recall and campaign targeting. RFM analysis is super useful in understanding responsiveness of your customers and for segmentation driven database marketing.

## What are the questions that RFM answer?

1. Who are my best customers?
2. Which customers are at the verge of churning?
3. Who has the potential to be converted in more profitable 
4. customers?
5. Who are lost customers that you don’t need to pay much attention to?
6. Which customers you must retain?
7. Who are your loyal customers?
8. Which group of customers is most likely to respond to your current campaign?

## RFM Value Calculations

Wondering how to calculate RFM scores for your customer database? It's really simple if you follow these steps. We need a few details of each customer:

* Customer ID / Email 
* Recency (R) as days since last purchase: How many days ago was their last purchase? The most recent purchase date from today to calculate the recency value (in days).
* Frequency (F) as total number of transactions: How many times has the customer purchased from our store? For example, if someone placed 5 orders over a period of time, their frequency is 5.
* Monetary (M) as total money spent: How much money has a customer spent? Simply total up the money from all transactions to get the M value.


The table below is an example of what you should obtain after all calculations:

|Customer ID|Recency|Frequency|Monetary
|-----------|-------|---------|-------|
|CUS-123    |5      |5        |1021
|CUS-345    |1      |15       |821
|CUS-392    |14     |3        |150
|CUS-019    |33     |2        |54
|CUS-871    |50     |1        |30


The calculation is based on a time range, I suggest a minimum of 3 months, but it can be calculated for a longer time range too or many different slots. For example, it’s interesting to calculate the RFM matrix and compare the results for the previous 3 or 6 months.

## RFM Score Calculations

Once we have RFM values, we assign a score from one to five to recency, frequency, and monetary values individually for each customer. Five is the highest value, and one is the lowest value.

**RFM values and RFM scores are different. Value is the actual value of R/F/M for that customer, while Score is a number from 1–5 based on the value.**

To calculate the score, we first sort values in descending order (from highest to lowest) and set the scores. The most recent purchases are considered better and hence assigned a higher score.

## Two methods to calculate the scores on a scale of 1–5 points.

Different businesses may use different methods of RFM formulas for ranking the RFM values on a scale of 1 to 5.

### 1-Fixed ranges

*Example:* If someone bought within the last 24 hours, assign them 5. In the last 3 days, score them 4. Assign 3 if they bought within the current month, 2 for the last six months, and 1 for everyone else.

The scale can be adapted to the individual business since they decide what range they consider ideal. As the business grows, score ranges may need frequent adjustments.

If there are recurring payments but with different payment terms — monthly, annual, etc — the calculations can go wrong.

### 2-Quantiles

It consists to make five equal parts based on available values, dividing by in 5 equal parts.

If we take 100 customers and we make five equal ranges of percentile, the score of 18 will fall in the 0–20 range, which would be the 1st quintile. A percentile value 51 will fall in the 50–75 range, and hence 4th quintile.

It remains the recommended method to calculate the scores because it solves a lot of problems in fixed range methods and it works with any industry since ranges are picked from data itself, they distribute customers evenly and do not have cross overs.

### Example of RFM calculation based on fixed ranges

In this table, you can see how to set the scoring for Recency.

|Customer ID|Recency|R-Score
|-----------|-------|-------
|CUS-345    | 1     | 5
|CUS-123    | 5     | 4
|CUS-392    | 14    | 3
|CUS-019    | 33    | 2
|CUS-871    | 50    | 1


In this second table we set the score for Frequency.

|Customer ID|Frequency|F-Score
|-----------|---------|-------
|CUS-345    | 15      | 5
|CUS-123    | 5       | 4
|CUS-392    | 4       | 3
|CUS-019    | 2       | 2
|CUS-871    | 1       | 1


The last one, we set the score for Monetary.

|Customer ID|Monetary |M-Score
|-----------|---------|-------
|CUS-123    | 1021    | 5
|CUS-345    | 821     | 4
|CUS-392    | 150     | 3
|CUS-019    | 54      | 2
|CUS-871    | 30      | 1

Now, we can put all togheter and group by scores identifying who purchased recently, are frequent buyers and spend a lot are assigned score of 555 – Recency(R) – 5, Frequency(F) – 5, Monetary(M) – 5. 

|Customer ID|R-Score|F-Score|M-Score
|-----------|-------|-------|-------
|CUS-345    | 5     | 5     | 4
|CUS-123    | 4     | 4     | 5
|CUS-392    | 3     | 3     | 3
|CUS-019    | 2     | 2     | 2
|CUS-871    | 1     | 1     | 1


Understanding 50 customer segments can still be hard, **we can summarize the analysis into 11 customer segments in the following table.**

<table><tbody><tr><td><strong>Customer Segment</strong></td><td><strong>Recency Score Range</strong></td><td><strong>Frequency &amp; Monetary Combined Score Range</strong></td></tr><tr><td>Champions</td><td>4-5</td><td>4-5</td></tr><tr><td>Loyal Customers</td><td>2-5</td><td>3-5</td></tr><tr><td>Potential Loyalist</td><td>3-5</td><td>1-3</td></tr><tr><td>Recent Customers</td><td>4-5</td><td>0-1</td></tr><tr><td>Promising</td><td>3-4</td><td>0-1</td></tr><tr><td>Customers Needing Attention</td><td>2-3</td><td>2-3</td></tr><tr><td>About To Sleep</td><td>2-3</td><td>0-2</td></tr><tr><td>At Risk</td><td>0-2</td><td>2-5</td></tr><tr><td>Can’t Lose Them</td><td>0-1</td><td>4-5</td></tr><tr><td>Hibernating</td><td>1-2</td><td>1-2</td></tr><tr><td>Lost</td><td>0-2</td><td>0-2</td></tr></tbody></table>


## – Articles Series
I’m writing an article series based on RFM matrix to explain different applicable actionable tactics to grow your business. 

**All articles and suggestions written in the articles are result of works done and hours spent on testing.**

[Subscribe to get in your inbox high consulting and actionable tips, every week.](https://bit.ly/3h1Jdsh)