Converter tool

RFM Segmentation

Score every customer on recency, frequency and monetary value from a plain transactions file, sort them into named segments such as Champions and At Risk, and download the list. It runs in this browser tab; the file is never uploaded.

Input

1. Load your transactions

Or paste transactions as text

RFM Segmentation

Operator: Abdulla Al Fahad. How tools are built and checked

RFM looks at three things you already have in an order export. Recency is how long ago the customer last bought. Frequency is how many times they bought. Monetary is how much they spent. Ranking customers on each, then combining the ranks, gives you groups that behave differently: the ones who bought yesterday and buy every month, the ones who spent a lot a year ago and vanished, the ones who made one small purchase last week.

This page does the scoring and the grouping from a plain transactions file. Each customer gets a score from 1 to 5 on each metric (or 1 to 3 or 1 to 4 if you prefer coarser levels), the scores are looked up on a fixed grid to give one of eleven named segments, and you get a summary by segment, a heat grid and a per-customer list to download. The rules are shown on the page and in the workbook, so you can see why a customer landed where they did. The file is processed in this browser tab and is not uploaded.

Key features

  • Recency, frequency and monetary scored from 1 to 5, 1 to 4 or 1 to 3, with the best customers always scoring highest
  • Eleven named segments from a fixed 5 by 5 grid that is printed on the page and in the workbook
  • Frequency by transaction rows or by distinct purchase days, and a choice to drop or keep refunds
  • Editable reference date, so recency can be measured from the day of your export
  • Summary by segment with customer and revenue shares, a recency-by-F/M count grid, and a bar chart
  • Per-customer table with sorting and paging, downloadable as CSV or as a five-sheet XLSX
  • Notes about tied values, tiny datasets and skipped rows shown next to the result rather than hidden

RFM scores, the segment grid and tie handling

The file (or pasted text) has one row per transaction. Customer, date and amount columns are guessed from the headers and cell contents and each can be changed. An amount column is optional: without one, monetary is not scored and the segment uses recency and the frequency score alone.

Rows missing a customer id, with an unreadable date or with an amount that is not a number are skipped and counted, with the first few row numbers listed. Accounting negatives such as (25.00) count as refunds, and slash dates such as 03/04/2025 are read month first unless another value in the column decides the order, with an override on the page.

The reference date is the day recency is measured from. By default it is the day after the latest transaction in the file, so the most recent buyer has a recency of 1 day. You can type your own, for example the day you pulled the export; transactions after it are ignored. Negative amounts can be left out entirely, which removes refund rows from both frequency and monetary, or kept, in which case they reduce monetary and still count as rows. Frequency can count transaction rows or the number of different days with a purchase, which stops one order split over three lines from counting as three.

Output is a table with, per customer, the last transaction date, recency in days, frequency, monetary, the three scores, the three-digit RFM code such as 554 and the segment. The XLSX has five sheets: Summary by segment, a Score grid of counts, Customers with filters, Segment definitions and a Method sheet. The CSV is the customer list alone.

How it works

For each customer the tool keeps the last transaction day, the row count, the set of distinct days and the amount total. Recency is the reference day minus the last day. These three numbers are then ranked across all customers, and for recency the ranking is flipped so that a small number of days ranks high.

Scores are based on rank, not on equal-width value ranges. Every value is given its mid-rank, meaning tied values share the average of the ranks they cover. The percentile is (mid-rank minus 0.5) divided by the number of customers, and the score is the whole part of percentile times the number of levels, plus one, never above the top level. With no ties and 100 customers, scoring 1 to 5 puts about 20 in each level. Customers with identical values always get identical scores, which is why a heavy tie, such as 60 percent of customers having bought once, puts all of them in one level near the middle of their tie group instead of splitting them arbitrarily.

The segment is read off a grid. The row is the recency score. The column is the average of the F and M scores, rounded to the nearest whole number with halves rounding up, so 3.5 becomes 4. When you use 3 or 4 levels, the scores are first stretched to the 1 to 5 scale (1, 3, 5 for three levels; 1, 2, 4, 5 for four), so one grid serves all three settings. Without an amount column, the F score takes the place of the F and M average.

The grid is: recency 5 with F/M 4 or 5 is Champions, recency 4 with F/M 4 or 5 is also Champions; recency 5 with F/M 2 or 3, and recency 4 with F/M 2, is Potential Loyalist; recency 4 or 5 with F/M 1 is New Customers (recency 3 with F/M 1 is Promising); recency 4 with F/M 3 and recency 3 with F/M 3 to 5 are Loyal Customers; recency 3 with F/M 2 and recency 2 with F/M 3 are Need Attention; recency 2 with F/M 1 or 2 is About To Sleep; recency 2 with F/M 4 or 5, and recency 1 with F/M 3, are At Risk; recency 1 with F/M 4 or 5 is Can't Lose Them; recency 1 with F/M 2 is Hibernating and recency 1 with F/M 1 is Lost.

Common use cases

  • An online shop exports a year of orders before a spring campaign and wants separate messages for people who should be thanked and people who should be asked back.
  • A coffee subscription business checks how much revenue sits in customers who have not ordered for four months but used to order monthly, the Can't Lose Them group.
  • A freelancer with invoice data scores clients by how recently and how often they paid, to decide whom to call first.
  • A small charity ranks donors from a donation log to find recent first-time givers to thank, and lapsed large donors to contact personally.

How to use this tool

  1. Choose the transactions file or paste rows, or press Use sample data to see 90 made-up customers.
  2. Confirm the customer, date and amount columns. Leave the amount empty if you only have dates.
  3. Pick the number of score levels, how frequency is counted, and what to do with negative amounts. Type a reference date if you want recency measured from a particular day.
  4. Read the segment summary, the bar chart and the grid. Sort the customer table to find the best or the most at-risk customers.
  5. Download the CSV for the customer list or the XLSX for the summary, grid, definitions and method together.

Example

Twenty order lines from ten customers, scored in five levels (reference date 2025-03-01)

customer,date,amount
ana,2025-02-27,80
ana,2025-02-10,60
ana,2025-01-20,90
ana,2025-01-05,70
ben,2025-02-28,200
ben,2025-02-14,150
ben,2025-01-30,180
cy,2025-02-20,40
cy,2025-02-02,35
dee,2025-02-25,25
eli,2025-01-12,300
eli,2024-12-15,250
eli,2024-11-20,310
fay,2025-02-26,15
gus,2024-12-01,45
gus,2024-10-14,50
hal,2024-10-02,20
ivy,2025-02-12,95
ivy,2024-12-20,60
jon,2025-02-22,30

Scores and segments

customer  recency  freq  monetary  R F M  segment
ben             1     3       530  5 5 5  Champions
ana             2     4       300  5 5 4  Champions
cy              9     2        75  3 3 3  Loyal Customers
dee             4     1        25  4 2 2  Potential Loyalist
fay             3     1        15  4 2 1  Potential Loyalist
jon             7     1        30  3 2 2  Need Attention
ivy            17     2       155  2 3 4  At Risk
eli            48     3       860  2 5 5  At Risk
gus            90     2        95  1 3 3  At Risk
hal           150     1        20  1 2 1  Hibernating

eli has the highest spend of all ten, yet is At Risk: recency 2 with an F/M average of 5. Ana and Ben together hold 39.4% of revenue.

Tips for best results

  • Use a reference date that matches the day you pulled the data. If the export is a month old and you leave the default, every customer looks a month more recent than they are.
  • Count distinct days when orders are split into several lines or shipments; count rows when each row is a real separate purchase.
  • Prefer 3 levels for fewer than about 100 customers. Five levels on 40 customers puts eight in each group, which is too thin to act on.
  • Segment names are labels for the grid cell, not statements about your business. If your product is bought once a year, nobody is ever a Champion by frequency, so read the grid relative to your own buying cycle.
  • Sort the customer table by monetary within a segment to start with the customers who matter most to the revenue.

Common pitfalls

Scores are relative to the file. A customer who is a Champion in a small file may sit lower in a bigger one, because their rank among all customers decides the score, not a fixed spending threshold.

Heavy ties matter. When most customers have a frequency of 1, they all share one score. The page tells you when a metric has fewer different values than score levels so you are not surprised by empty levels.

Customers are matched by the exact id text after trimming spaces. The same person under two emails, or under Alice@x.com and alice@x.com, is scored as two customers.

A file that mixes currencies adds the amounts together without conversion, which distorts monetary. Split by currency first.

The file is capped at 300,000 rows and 25 MB. A longer file is cut at the cap with a warning.

Common errors and how to fix them

Everyone ends up in the same two or three segments
That usually means one metric has very few different values, for example every customer bought once. Check the notice under the stats, switch frequency to distinct days, or use fewer score levels.
The page says no transactions are left, or far fewer customers appear than expected
A reference date earlier than the data ignores everything after it. Clear the reference date field or move it past the last transaction.
Many rows are skipped for an unreadable date
Choose the correct date column, or set the slash-date order. Free-text dates cannot be read; export them as 2025-03-09 or as Excel dates.

Best practices

  • Run the analysis on the same period each time, such as the last 12 months, so segment sizes can be compared from one run to the next.
  • Save the Method sheet with the numbers so whoever receives the list knows the reference date, refund handling and scoring rule.
  • Use the segment list as a starting point for a short, specific action per group rather than one message for everyone.

Why rank-based scores instead of fixed thresholds

A fixed rule such as 'spent over 500 is a 5' works only if you know the right thresholds for your business, and it breaks as prices change. Rank-based scoring needs no thresholds: the top fifth of customers by spend score 5 whichever currency or price level you use. That is also its limit, because it always produces groups of roughly even size, even when there is no real difference between them.

To see how much a score means, look at the average recency, frequency and monetary values per segment in the summary table. If the Champions average 45 orders and the Loyal group average 44, the distinction is cosmetic for your data.

What happens with small files and ties

With fewer customers than score levels the ranking is only a rough ordering. With ties, no customer is placed in a lower or higher score than another customer with the same value. Suppose ten customers have frequencies 1, 1, 1, 1, 1, 1, 2, 2, 5 and 9, scored in five levels. The six ones share ranks 1 to 6, mid-rank 3.5, percentile 0.3 and score 2; the two twos share mid-rank 7.5 and score 4; five and nine score 5. Nobody gets a 1 or a 3 for frequency, and that is the honest outcome of the data.

Many scoring spreadsheets split such ties arbitrarily by row order, so two customers with identical behaviour can land in different groups depending on how the file was sorted. This tool does not do that, so rerunning on a re-sorted file gives the same scores.

Frequently asked questions

How are the eleven segments defined?

Each is a set of cells on a 5 by 5 grid of recency score against the average of the F and M scores. The full grid is listed under How segments are assigned on the page and on the Segment definitions sheet of the XLSX.

Why is a big spender marked At Risk?

Because recency decides the row of the grid. A customer with very high frequency and spend but a recency score of 2 or lower sits in the At Risk or Can't Lose Them cells; that is the point of the grid, it flags valuable customers who have gone quiet.

Does it work without an amount column?

Yes. Leave the amount column empty and the tool scores recency and frequency only; the segment then uses the frequency score in place of the F and M average.

Is my customer data uploaded?

No. The file is read and scored in this browser tab. The spreadsheet library for XLSX export is loaded only when you press the XLSX button.