RFM Score: Formula, Calculation and a Worked Example
- The formula is a ranking, not an equation: sort customers on days since last order, order count and total spend, split each into five equal groups, and concatenate the digits into a code from 111 to 555.
- Recency is inverted. The most recent fifth of your base scores 5, which is why the digit order R-F-M matters when reading a code like 155.
- A 5 means the top fifth of your own customers, so there is no industry benchmark for a good RFM score and no reason your code should match Shopify's or Klaviyo's.
- Scales differ by tool: Shopify's report scores 1 to 5 across eleven named groups, Klaviyo's scores 1 to 3 on a 30-day default window.
- The digits are ordinal, so treat them as ranks rather than intervals, and track the movement between two runs rather than the level of a single one.
An RFM score is a three-digit code that ranks a customer on how recently they bought, how often, and how much they spent. Each dimension is split into equal groups and scored, usually 1 to 5, then the digits are joined into a code from 111 to 555. Omniconvert has applied the method across the CROBenchmark dataset of 7,000+ stores in 15+ industries, against 248+ audit criteria, over 13 years in eCommerce conversion rate optimization [CROBenchmark Report 2026, Omniconvert].
It earns its place because repeat buyers carry revenue out of proportion to their number: across 12,000+ merchants, returning customers were about 21% of customers but 44% of revenue [Gorgias data, 2026], while 12-month repeat purchase rates cluster near 18.8% in a sample of 156,000 customers [BS&Co, 2026]. An RFM score is the cheapest way to find that 21% in your own export.
Omniconvert Commander (formerly Nexus) is the AI marketing agent that plans your Meta and Google ads around the products that make your Shopify store the most profit; it calculates RFM scores automatically, groups customers into ready-made segments, and turns them into ranked actions. This guide gives the formula, a worked example with real numbers, the spreadsheet and SQL versions, the reason your tools disagree, and the three ways the score misleads you. For the plain-language basics, see what RFM means; for the wider method, read what RFM analysis is. This article is the scoring and calculation pillar, and each section answers its heading first.
What is an RFM score?
RFM stands for recency, frequency and monetary value. The score matters in eCommerce because it is built from transactions rather than from stated intent, campaign source or survey answers, so it describes what a customer did with their own money. That makes it the most reliable behavioral signal most stores already own, and it needs no tracking script to produce.
The critical word in the definition is ordinal. The digits are positions in a queue, not measurements. A customer scores 5 on monetary value because they sit in the top fifth of your base by spend, which means a $90 lifetime spend can score 5 in a low-ticket store and 2 in a furniture store [mcpanalytics, 2026]. Everything confusing about RFM scores follows from this single property, including the fact that two tools can score the same customer 5 and 3 and both be correct.
The score also ranks and groups in one step. Instead of one undifferentiated customer list, you get a map: the customers worth protecting, the ones slipping away, and the new arrivals worth nurturing all separate out, which is the foundation of customer value optimization and of any serious customer segmentation work.
What is the RFM score formula?
Written out, the formula has four moves:
-
1. Three raw values per customerR = days since last order. F = number of orders in the window. M = total spend in the window. One row per customer, three numbers.
-
2. Rank the base on each valueSort all customers on R, then on F, then on M. You are now working with positions, not amounts.
-
3. Cut each ranking into quintilesA quintile is defined as one of five equal groups produced by splitting a sorted list at the 20th, 40th, 60th and 80th percentiles. Score the groups 1 to 5. For F and M, the top group scores 5; for R the order reverses, because a low number of days since the last order is the good outcome.
-
4. Concatenate, do not addJoin the digits in R-F-M order as text: an R of 5, an F of 1 and an M of 5 give the code 515, not the sum 11. Adding them throws away the information that makes the code readable, because 511 and 115 are very different customers with the same total.
This is the de-facto standard method, and it is what the major platform guides describe [Shopify, 2026; CleverTap, 2026].
The weighted variant. Some teams compute a single number instead, such as (R x 0.5) + (F x 0.3) + (M x 0.2), to rank customers in one column. Weighting is justified only when you can say why one dimension deserves more say for your business, and it costs you the readability of the code: a weighted 3.4 does not tell you whether the customer is lapsing or simply cheap. Keep the three digits for action, and add a weighted column only for sorting a list.
How do you calculate an RFM score step by step?
-
Step 1: Export the purchase historyOne row per customer: last order date, order count and total spend, over a fixed window of the last 12 to 24 months. Pick the window to cover at least two purchase cycles for your category, and record which window you used, because changing it changes every score.
-
Step 2: Choose the scale1 to 3 under roughly 30,000 customers, 1 to 4 up to about 200,000, 1 to 5 above that. The reasoning is in the scale section below.
-
Step 3: Derive the cutoffs from your own dataRead the percentile boundaries off each sorted column rather than copying thresholds from an article. Frequency usually needs a different treatment, covered below.
-
Step 4: Score each customer on all three dimensionsAssign the digit for the group each customer falls into, inverting recency. Every customer ends with exactly three digits.
-
Step 5: Concatenate and groupJoin the digits, then roll the 125 possible codes up into a handful of named segments with one action each. Store the run date next to the code: you will want it next month.
Here are the cutoffs a mid-market store might read off its own data. Treat the numbers as an illustration of the shape, not as thresholds to copy.
| Score | Recency (days since last order) | Frequency (orders) | Monetary (total spend) |
|---|---|---|---|
| 5 (top fifth) | 0 to 45 | 6 or more | Over $420 |
| 4 | 46 to 110 | 4 to 5 | $240 to $420 |
| 3 | 111 to 200 | 3 | $150 to $240 |
| 2 | 201 to 330 | 2 | $80 to $150 |
| 1 (bottom fifth) | 331 or more | 1 | Under $80 |
A worked example, end to end. Five customers from the same export, scored against the cutoffs above:
| Customer | Days since last order | Orders | Total spend | R | F | M | Code | Read it as |
|---|---|---|---|---|---|---|---|---|
| A | 18 | 9 | $780 | 5 | 5 | 5 | 555 | Best customer. Protect, do not discount. |
| B | 402 | 7 | $610 | 1 | 5 | 5 | 155 | Was your best. Win back, highest value at stake. |
| C | 30 | 1 | $690 | 5 | 1 | 5 | 515 | One big first order. Earn the second. |
| D | 26 | 1 | $60 | 5 | 1 | 1 | 511 | New and cheap. Onboard before upselling. |
| E | 250 | 2 | $120 | 2 | 2 | 2 | 222 | Drifting. Cheap reactivation, low priority. |
Note what happens to customers B and C. Both score 5 on monetary value and both are worth a campaign, but a win-back for a lapsed loyalist and a second-purchase nudge for a one-time big spender share nothing: not the offer, not the timing, not the message. The digit order is the whole point, and it is why 155 is the code worth finding first in any export. Both are also classic churn risk profiles at different stages, and both are easier to spot once you know how to identify a repeat customer in your own data.
How do you calculate RFM in a spreadsheet or in SQL?
NTILE(5) OVER (ORDER BY ...) does the quintile split in one line per dimension. Both produce identical codes; the difference is that SQL can be re-run next month without touching anything.In a spreadsheet. Put days since last order in column B, orders in C and total spend in D, with one row per customer. Then:
R score (E2): =MAX(1, ROUNDUP(5 * (1 - PERCENTRANK.INC($B$2:$B$5001, B2)), 0))
F score (F2): =MAX(1, ROUNDUP(5 * PERCENTRANK.INC($C$2:$C$5001, C2), 0))
M score (G2): =MAX(1, ROUNDUP(5 * PERCENTRANK.INC($D$2:$D$5001, D2), 0))
RFM code (H2): =E2 & F2 & G2
The 1 - in the first formula is the recency inversion. The MAX(1, ...) stops the single best-ranked row from scoring 0. Either PERCENTRANK or a QUARTILE-style split is fine for a first pass [Podvector, 2026].
In SQL. Summarize orders per customer, then let the window function cut the quintiles:
WITH c AS (
SELECT customer_id,
MAX(order_date) AS last_order,
COUNT(*) AS orders,
SUM(order_total) AS spend
FROM orders
WHERE order_date >= CURRENT_DATE - INTERVAL '24 months'
GROUP BY customer_id
)
SELECT customer_id,
6 - NTILE(5) OVER (ORDER BY last_order DESC) AS r,
NTILE(5) OVER (ORDER BY orders) AS f,
NTILE(5) OVER (ORDER BY spend) AS m
FROM c;
NTILE(5) is the standard split [Arktis, 2026]. Ordering recency descending and subtracting from 6 gives the inversion without a CASE statement. Wrap the query in a view, schedule it monthly, and keep each run's output with its date: that history is what turns the score into a trend rather than a snapshot.
One warning on frequency. NTILE will happily force equal groups onto a column where 70% of the values are the number 1, which is the normal shape of an eCommerce base. The result is quintile boundaries that fall inside a tie, so two customers with one order each land in different groups. Fixed bands handle it more honestly: 1 order scores 1, 2 scores 2, 3 scores 3, 4 to 5 scores 4, and 6 or more scores 5 [Daymark, 2026; LatentView, 2026].
Which scale should you use: 1 to 3, 1 to 4 or 1 to 5?
| Scale | Possible codes | Customer base | Why |
|---|---|---|---|
| 1 to 3 | 27 | Under ~30,000 | Groups stay large enough to act on, and cutoffs hold between runs |
| 1 to 4 | 64 | ~30,000 to 200,000 | Separates the middle without splintering the tails |
| 1 to 5 | 125 | ~200,000 and above | Enough volume that each of 125 cells still holds a mailable audience |
The rule behind the table is simple arithmetic: divide your base by the number of cells and ask whether the answer is a segment you would write a campaign for. Thirty thousand customers over 125 cells averages 240 people per code, and the distribution is far from even, so most codes hold a dozen. That is noise, not segmentation. Dropping to 1 to 3 is not a downgrade; it is the honest resolution of the data you have.
Why doesn't your RFM score match Shopify's or Klaviyo's?
rfm_group segment filter. Klaviyo's RFM report scores 1 to 3, so its Champions carry codes like 333 or 323, and it defaults to a 30-day window. Neither matches a quintile model you build in SQL, and none of them is wrong.This is the single most common reason a team loses confidence in RFM: the same customer appears as a champion in one screen and mid-table in another, and someone concludes the data is broken. It is not. Three things differ between implementations, and each of them moves the digits.
| Implementation | Scale | Default window | Output | Cutoffs |
|---|---|---|---|---|
| Shopify customer analysis report | 1 to 5 per dimension | Store lifetime | Eleven named groups, filterable as rfm_group |
Platform-defined |
| Klaviyo RFM report | 1 to 3 per dimension | 30 days | Named groups; Champions are 333, 332, 323 | Percentile cutoffs are editable |
| Your own SQL or spreadsheet | Whatever you choose | Whatever you choose | Raw three-digit codes | Yours, and documented |
Shopify's eleven groups are Champions, Loyal, Active, New, Promising, Needs attention, At risk, Previously loyal, Almost lost, Dormant and Prospects, and because they surface as a segment filter you can build a flow on them without exporting anything [Shopify segment list, 2026]. Klaviyo sits its RFM report under Personalization, then Customer insights, and its separate predictive analytics needs roughly 500 customers with orders and at least 180 days of history before it will model anything; predicted lifetime value there defaults to a 365-day horizon and the model retrains at least weekly [Klaviyo, 2026].
Practical advice: pick one implementation as the source of truth, write down its scale and window, and treat the others as views. Reconciling two RFM scores is wasted work, because they are answering slightly different questions. If you are choosing between platforms rather than reconciling them, the trade-offs are laid out in our round-up of customer intelligence and RFM tools and in the guide to picking an RFM segmentation tool.
Omniconvert Commander derives the cutoffs from your own base and keeps the segments current between runs, so you stop reconciling two scores and start acting on one.
See how it works →What is a good RFM score?
This is the question the metric cannot answer, and saying so plainly is more useful than inventing a benchmark. Ask "is 445 good?" and the honest reply is another question: good compared with what? Against your own base, 445 is a strong customer. Against an industry figure, the comparison does not exist, because no two stores cut their quintiles at the same values.
So replace the absolute question with three answerable ones:
- Where does this customer sit relative to the rest? That is what the digits already tell you.
- Which codes hold the most revenue at stake? Multiply the count of each code by its average spend; the answer is usually not 555.
- Which direction is this customer moving? Covered in the movement section, and the only one of the three that predicts anything.
One caution worth stating because it costs real money. Teams read 1 to 5 as a linear scale and assume a 5 is roughly 25% better than a 4, in the way a school grade of A sits a step above a B. Spend in eCommerce is closer to a power law, so the top monetary quintile often sits an order of magnitude above the next one rather than a step above it. This is the arbitrary coherence trap: the number looks like a grade and behaves like an exponent, and a budget split evenly across quintiles because they look evenly spaced will underfund the only group that matters. Check the actual revenue in each quintile before you allocate against it, and read the high-value codes alongside Customer Lifetime Value rather than instead of it.
Which segments do RFM scores create?
Nobody writes campaigns against 125 codes. The roll-up is the step that makes the score operational, and the naming is not decoration: a team argues about whether to discount code 155, and agrees immediately about winning back an Ex-Lover. Distribution varies by store, so treat the shares below as directional.
| Segment | Typical RFM signal | Rough share of base | Priority action |
|---|---|---|---|
| Soulmates | High R, high F, high M (555) | Small | Reward, retain, and turn into advocates |
| Lovers | High R, mid-high F and M | Moderate | Grow toward Soulmates |
| Potential Lovers | High R, low F, high M | Small | Drive a second purchase |
| New Passions | High R, low F, high M (new) | Small to moderate | Onboard and convert to repeat |
| Flirting | Recent, low F, moderate M | Moderate | Encourage the next order |
| Apprentice | Recent, low F, low M (511) | Moderate | Build trust before upselling |
| Platonic Friends | Mid R, mid F, below-average M | Moderate to large | Lift average order value |
| About To Dump You | Falling R, was active | Moderate | Reactivate before they churn |
| Ex-Lovers | Low R, high past F and M (155) | Small to moderate | Win back high past value |
| Don Juan | Low R, low F, high M (115, one order) | Small | Re-engage the single big spender |
| Break-Ups | Low R, low F, low M (111) | 15 to 25 percent | Accept natural churn or send a final offer |
Around 15 to 25 percent of a base typically lands in Break-Ups as natural churn, so the realistic goal is to slow the slide and move customers up a rung, not to save everyone. The segment definitions, with the full code mapping, are in the RFM segmentation guide; the actions that make the moves stick are in the customer retention strategy guide; and the way RFM compares with other cuts of the same base sits in customer segmentation models.
Nextbase ran one A/B test with Omniconvert on a category section that sorts products by use case, on desktop, and recorded +26.16% conversion rate, +23.7% revenue per user and a 98.53% chance to win [Omniconvert, Nextbase case study]. It is a testing result rather than a scoring one, but it makes the same argument RFM makes: grouping by behavior and showing each group what fits it beats presenting one undifferentiated list.
What is the Omniconvert RFM Scoring Framework?
| Stage | Goal | Main lever | Output |
|---|---|---|---|
| Score | Rank every customer on behavior | Quintiles on recency, frequency, monetary | A three-digit code per customer, dated |
| Segment | Group similar codes | Named segments rolled up from the codes | A handful of actionable segments |
| Prioritize | Decide where to act first | Revenue at stake and churn risk per segment | A ranked list of segments |
| Act | Run the campaign, then re-score | Offer, message and timing per segment | Measured results and a second dated score |
The second dated score in that last row is the output teams skip, and it is the one that compounds. Omniconvert Commander is the AI marketing agent that plans your Meta and Google ads around the products that make your Shopify store the most profit; it runs this loop against your transactional data, so the codes refresh and the segment movements are visible without anyone rebuilding a spreadsheet. The deeper mechanics of the underlying model are in the RFM model guide.
What are the limitations of RFM scoring?
Taking them in order, because each has a different fix.
Ordinal. The digits are positions. Averaging them produces a number with no meaning, and summing them collapses 511 and 115 into the same 7. Keep the three digits separate for action, and use raw values when you need arithmetic.
Relative. Recut the quintiles and every code changes, even if no customer did anything. That makes comparing this month's score with last month's meaningless unless you froze the cutoffs, which is a decision to make explicitly rather than discover later.
Lagging. The score records what already happened. It is a stopwatch, not a coach: it gives you the lap time accurately and does nothing to make the runner faster. Pair it with forward-looking signals, predicted lifetime value, cohort analysis, your churn rate and qualitative input such as NPS, plus the loyalty metrics that explain why a frequency digit moved.
There is a fourth limit, and it is the one that does the most damage because it looks like success. Goodhart's Law says that when a measure becomes a target, it stops being a good measure, and RFM is unusually easy to target. Set a team a goal of growing the 555 count and they will discount their way there, moving customers into the top quintile at a margin that makes the segment worse business than it was before. In Omniconvert's customer value optimization audits with eCommerce brands through 2026, we repeatedly find the same shape: a 555 population that has grown year on year while contribution margin per customer in that group has fallen [Omniconvert, 2026]. Score the customers, target the margin.
The eCommerce brands that plateau near an 18% repeat purchase rate consistently share one pattern: they calculate RFM once, present the segment counts in a deck, and never score again, so every campaign is aimed at where customers were rather than where they are going. The benchmark gap closes fastest when operators treat the transition between two dated runs as the primary unit of measurement, not the count of customers currently sitting in the best segment.
How do you track RFM score movement between runs?
Here is the procedure, and it costs one extra column.
-
1. Freeze the cutoffsSave the quintile boundaries from your first run and reuse them. If you recut them each time, you are measuring your cutoffs rather than your customers. Revisit the boundaries deliberately, perhaps once a year, and note the date you changed them.
-
2. Store the code with its run dateOne row per customer per run. Three runs of 50,000 customers is a trivial table and the most valuable one you will build this quarter.
-
3. Diff the digits, not the segmentsCompare R, F and M separately. A falling R with a steady F and M is a customer going quiet; a steady R with a rising M is a customer trading up. Both are invisible in a segment-level count.
-
4. Act on the transitions firstA 555 that dropped to 455 is the highest-value intervention available, and it is the one a snapshot never shows you, because 455 still looks like a good customer.
Read this way, the score stops being a verdict and becomes a tripwire. The segments in the table above tell you who someone is today; the migration between two runs tells you what is happening to them, and the second question is the one a retention campaign can actually answer.
RFM score FAQ
There is no universal cutoff, because an RFM score is a rank inside your own customer base. A 5 means the top fifth of your customers on that dimension, so the same spend that earns a 5 in one store earns a 2 in another. The useful comparison is customer against customer, and this month's code against last month's.
Rank every customer on three raw values: days since last order, order count and total spend. Split each ranking into five equal groups and score them 1 to 5, inverting recency so the most recent fifth scores 5. Then concatenate the three digits into a code from 111 to 555. No multiplication is involved unless you deliberately weight one dimension.
Because they are not the same measurement. Shopify's customer analysis report scores each dimension 1 to 5 and buckets customers into eleven named groups you can filter on with the rfm_group segment. Klaviyo's RFM report scores 1 to 3, so its Champions are 333, 332 or 323, and it defaults to a 30-day window. Neither is wrong, and neither will match a quintile model you build yourself.
Yes, and it is the right way to start. Export one row per customer with three columns: days since last order, order count and total spend. Add a percentile rank on each column, convert each rank into a 1 to 5 digit, then concatenate the three digits. Move to SQL or an automated tool once you need the score refreshed every month rather than once.
Quintiles want a few hundred customers in every group to be stable, and a 5 by 5 by 5 grid creates 125 cells. Under roughly 30,000 customers use a 1 to 3 scale, use 1 to 4 up to about 200,000, and keep 1 to 5 for larger bases. A finer scale that splits your base into segments too small to mail buys precision you cannot act on.
Omniconvert Commander reads your store's transactional data, recalculates recency, frequency and monetary cutoffs on your own base, and keeps the resulting segments current between runs. Because it holds the previous run, it shows which customers moved up or down since the last score rather than only where they sit today, so win-back budget goes to the codes that are falling rather than the ones that have already gone quiet.
An RFM score is a rank, not a value: a 5 is the top fifth of your own base, which is why 445 has no meaning on its own and why two tools scoring the same customer 5 and 3 are both right. Calculate it properly once, in a spreadsheet if that is all you have, then run it again next month and read the difference, because a 545 climbing to 555 and a 555 slipping to 455 need opposite campaigns. See how Omniconvert Commander keeps the score and the movement current.
Score your customers, then watch them move
Omniconvert Commander recalculates RFM cutoffs on your own transactional data, keeps the segments current between runs, and shows which customers changed code since the last score. That is the part a spreadsheet cannot do twice.