Customer-base analysis with ABC, XYZ and RFM

TL;DR
We group customers by value, stability and behavior to manage sales and churn precisely. This article covers ABC (Pareto), XYZ (demand stability) and RFM (recency, frequency, monetary) with formulas, a unified numeric example on the same customers, a table template and an action checklist for each segment.
Regular segmentation of the customer base is a direct way to see who brings revenue, who is burning out and what will retain them. Without this optics the budget gets spread evenly: the same attention goes to a client with a million‑ruble check and to a one‑time buyer for a thousand rubles. Below are three practical approaches (ABC, XYZ and RFM) with formulas, a table template and a continuous numeric example using the same customers.
Customer base: what it is and why to analyze it regularly
A customer base is structured data about buyers: contacts, transaction history, amounts, dates, acquisition channels. Analysis turns raw rows into decisions: where to focus the sales team’s efforts, whom to retain, and where not to subsidize purchases with discounts.
Why analyze the base in practice:
- Prioritization. Understand which customers form the main revenue and profit.
- Retention. Spot churn early — those who stopped buying.
- Increase average check and frequency through targeted offers.
- Planning. Assess demand stability and reduce cash gaps.
- Budget efficiency. Don’t waste expensive touches on unpromising segments.
Customer analytics can be descriptive (what already happened) and predictive (what is likely to happen). ABC, XYZ and RFM are descriptive methods, but they provide the foundation for forecasts and CLV calculation.
Data required for calculations
Minimum fields without which the methods won’t work:
| Field | Why it’s needed | For which method |
|---|---|---|
| ID / customer name | Identification | All |
| Date of each transaction | Recency and stability | RFM, XYZ |
| Transaction amount | Revenue, average check | ABC, RFM |
| Profit / margin | Real value | ABC (more accurate than revenue) |
| Number of purchases | Purchase frequency | RFM, XYZ |
| Channel / segment | Analytical breakdowns | All |
Only collect personal data with customer consent and per law. For ABC/XYZ/RFM anonymized transactions are sufficient: name and phone are not necessary for the math, dates and amounts are.
How to populate the base without “noise”
Before analyzing, you must assemble the base. A short list on how to do this legally and without empty contacts:
- Lead magnet — a useful asset (checklist, calculator, guide) in exchange for contact. Works in B2B and services.
- Record all incoming contacts in CRM — every call, request, chat enters the system.
- Loyalty program — card or personal account with purchase history.
- Offline touchpoints — contracts, warranty slips, invoices.
- Partner and referral channels — contacts from recommendations.
Conversion of contact to a transaction and completeness of fields are more important than volume. A database of 50,000 rows without purchase history is useless for analytics.
ABC analysis: Pareto principle and when it fits
ABC analysis ranks customers by contribution to revenue (or profit) and divides them into three groups: A — most valuable, B — medium, C — minor. The foundation is the Pareto principle: roughly 20% of customers generate about 80% of the result.
- Group A — ~20% of customers, ~80% of revenue. Key clients that require personal attention.
- Group B — ~30% of customers, ~15% of revenue. Potential to grow into A.
- Group C — ~50% of customers, ~5% of revenue. Mass segment — automate work with them.

ABC analysis is appropriate when there is a noticeable stratification by check and you have at least 100 active customers. It answers “who brings the money” but says nothing about stability and loyalty — for that you need XYZ and RFM.
ABC in practice: steps, example and template
- Export revenue (preferably profit) per customer for the period.
- Sort by descending amount.
- Calculate each customer’s share in total revenue.
- Calculate cumulative percentage (running total).
- Assign groups: up to 80% cumulative — A, 80–95% — B, 95–100% — C.
A continuous example with five customers (the same customers will go through all three methods):
| Customer | Revenue, ₽ | Share | Cumulative % | Group |
|---|---|---|---|---|
| Alpha | 600 000 | 50% | 50% | A |
| Bravo | 300 000 | 25% | 75% | A |
| Charlie | 150 000 | 12.5% | 87.5% | B |
| Delta | 100 000 | 8.3% | 95.8% | B |
| Echo | 50 000 | 4.2% | 100% | C |
Total revenue — 1 200 000 ₽. Two customers (Alpha and Bravo) form 75% of revenue — this is your A group you must not lose.
XYZ analysis: how to measure demand stability
XYZ classification shows predictability of purchases via the coefficient of variation (V). This is the ratio of the standard deviation of amounts across periods to the mean, expressed as a percentage.
Formula: V = (standard deviation of amounts across periods / average amount) × 100%.
- X — V up to 10%: stable, predictable demand.
- Y — V from 10% to 25%: fluctuations, possible seasonality.
- Z — V greater than 25%: irregular and random demand.
Example for customer Alpha: across three quarters he purchased for 180,000, 210,000 and 210,000 ₽. Average — 200,000; deviation ≈ 14,142; V ≈ 7% → category X (stable). Customer Echo purchased for 40,000, 0 and 110,000 ₽ — V well above 25% → category Z (unpredictable).
For XYZ analysis the number of comparable periods matters more than the number of customers — plan for at least 3–4.
ABC+XYZ together: how to read the matrix
ABC/XYZ combines value and stability into a 9‑cell matrix — more informative than each method alone.
| X (stable) | Y (fluctuates) | Z (unpredictable) | |
|---|---|---|---|
| A (valuable) | AX — business backbone | AY — important but capricious | AZ — risk: big check but unstable |
| B (medium) | BX — reliable mid-tier | BY — grow into A | BZ — work selectively |
| C (small) | CX — automate | CY — minimal effort | CZ — candidates to “let go” |
AX customers are what the service is built around: high revenue and predictable. AZ is a high‑risk zone: losing such a customer hits revenue and their behavior is unstable.
RFM analysis: what R, F, M mean and how to choose thresholds
RFM segmentation evaluates customer behavior by three metrics: Recency (R), Frequency (F) and Monetary (M). This is not only “wallet size” but also purchase habits.
- R — recency: the more recently the customer bought, the higher the score.
- F — frequency: the more often they buy, the higher the score.
- M — monetary: the higher the total revenue, the higher the score.
Each metric is scored on a scale (commonly 1–3 or 1–5), where 3 (or 5) is best. Thresholds are set by quantiles of your base: split customers into equal groups. For example, for R: bought in the last 30 days — 3, 31–90 days — 2, more than 90 — 1.

RFM in practice: algorithm and calculation example
- Export for each customer the date of last purchase, number of purchases and total amount.
- Set thresholds for R, F, M (by quantiles or expert judgment).
- Assign scores 1–3 for each metric.
- Build the segment code (for example, 3-3-3).
- Group customers into understandable segments and assign scenarios.
RFM analysis example on the same five customers:
| Customer | R (days ago) → score | F (purchases) → score | M (₽) → score | Code |
|---|---|---|---|---|
| Alpha | 15 → 3 | 12 → 3 | 600 000 → 3 | 3-3-3 |
| Bravo | 40 → 2 | 8 → 3 | 300 000 → 3 | 2-3-3 |
| Charlie | 20 → 3 | 3 → 2 | 150 000 → 2 | 3-2-2 |
| Delta | 120 → 1 | 5 → 2 | 100 000 → 1 | 1-2-1 |
| Echo | 200 → 1 | 1 → 1 | 50 000 → 1 | 1-1-1 |
Interpretation: Alpha (3-3-3) — champion; Bravo (2-3-3) — loyal but hasn’t been recent — worth a reminder; Delta (1-2-1) and Echo (1-1-1) — at risk of churn or already lost.
Segments in practice: what to do for each code
RFM segmentation only works when a code is followed by action. Checklist for typical segments:
- Champions (3-3-3): early access to new products, VIP status, request for referrals. Don’t spam with discounts — they already buy.
- Loyal (x-3-x): loyalty program, cross‑sell/up‑sell to raise average check.
- At risk of churn (low R, high F/M): reactivation chain, personalized offer, manager call.
- Newbies (high R, low F): onboarding, incentivize a second purchase, familiarize with assortment.
- Sleeping / lost (1-1-1): cheap mass touches, reactivation mailing; if no response — remove from active work.

Examples by niche: in services — focus on reclaiming “at risk” via personal contact; in retail — grow frequency among the loyal; in B2B — retain AX clients and protect against the risk of relying on a single large customer.
CRM automation: what to configure
CRM removes routine: segments are recalculated automatically and a customer moves to another group when behavior changes. What to configure:
- Automatic calculation of RFM and ABC on a schedule (monthly/quarterly).
- Trigger scenarios: entered “at risk of churn” → start reactivation chain.
- Dashboard with segment dynamics and client churn.
- Integration with mailings and telephony for targeted touches.
You can start without CRM — in Excel or Google Sheets using the template above. Add automation when manual recalculation begins to eat time.
Common mistakes and how to avoid them
- Calculating by revenue instead of profit. A large customer with discounts and returns can be unprofitable.
- Ignoring recency. A client with high M but R = “a year ago” is near churn, not in group A.
- Incomparable calculation windows. Different periods make segments non‑comparable.
- Too fine granularity. 125 micro‑groups are impossible to serve — start with 5–7.
- Analysis without actions. A report no one uses doesn’t make money.
- One‑off effort. Base review is a regular cycle, not a one‑time project.
Which to choose: ABC, XYZ or RFM
| Criterion | ABC analysis | XYZ analysis | RFM analysis |
|---|---|---|---|
| What it evaluates | Contribution to revenue/profit | Demand stability | Behavior (recency, frequency, money) |
| Number of parameters | 1 | 1 | 3 |
| Main question | Who brings money | How predictable is demand | Who is leaving and what to offer |
| Minimum data | Transaction amounts | 3–4 periods | Dates + amounts + number of purchases |
| Database size | from 100 customers | periods matter | from 50 customers |
| Best task | Prioritization | Planning, procurement | Retention, communication |
How to choose: for quick prioritization — ABC; for planning and risk assessment — ABC/XYZ; for retention and anti‑churn scenarios — RFM. The optimal combination: ABC shows who you cannot lose, XYZ shows who is unstable, RFM shows how to work with them. This complex gives a holistic picture and protects revenue from unexpected collapses.
FAQ
- How often should ABC/XYZ/RFM segments be recalculated?
- At least once a quarter. If the sales cycle is short (retail, e‑commerce) — monthly. For long B2B deals a quarterly recalculation is sufficient. Frequency should match the sales rhythm.
- For XYZ which period should be taken and how many periods are needed?
- You need at least 3–4 comparable periods — weeks, months or quarters depending on your cycle. The key is equal length and consistent logic of periods to correctly calculate variation.
- Is it better to calculate ABC by revenue or by profit?
- By profit. Revenue distorts the picture: a large customer with discounts, returns and expensive delivery may look "valuable" while actually being unprofitable.
- How to correctly choose thresholds for R, F and M in RFM analysis?
- Split customers by quantiles of your database (for example into 3 or 5 equal groups). Threshold values depend on your purchase frequency and average check — fix them and don’t change without a good reason.
- Can I start without a CRM or is it mandatory?
- Yes, start in Excel/Google Sheets using the provided template. Add CRM when manual recalculation starts taking too much time — it automates segmentation and trigger scenarios.


