Converter tool

ABC Analysis for CSV

Rank items by value and label them A, B or C, with the cumulative percent shown for every row. Free, and it runs in your browser.

Only values above zero count toward the total. Zero, negative, empty and non-numeric cells are listed at the end as class C and reported below the result. The file is read by this browser tab.

Preview

Output Preview

Load a CSV, pick the item and value columns, and press Run ABC analysis.

ABC Analysis for CSV

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

ABC analysis sorts a list of items by how much each one is worth to you, then splits the ranked list into three groups. Class A is the short head of items that together make up most of the value, class B is the middle, and class C is the long tail of items that each matter little. Stock controllers use it to decide which parts get counted every month and which get counted once a year; buyers use it to decide which suppliers deserve a negotiation.

This tool does the ranking and labelling on a CSV. You pick the column that names each item, the column that holds its value (annual spend, units times cost, revenue, margin) and two cut-offs. It returns a new CSV with five columns: item, value, share_percent, cumulative_percent and class, already sorted from the largest value down, plus a summary of how many items and how much value landed in each class.

Key features

  • Item and value columns chosen from the file's own headers; the value column is pre-selected as the most numeric one
  • Editable A cut-off and B band, checked so they never add up to more than 100%
  • Share of total and running cumulative percent for every ranked row
  • Stable ranking: items with equal values keep the order they had in the file
  • Zero, negative, empty and non-numeric values listed separately as class C and reported by data row
  • A summary table with the item count, value and share of value per class
  • Downloads as a CSV named after the original file, ending in -abc.csv

Input is a comma-separated text file with one header row. Each later row is one item. The value cell may contain a plain number (4700), a number with thousands separators (48,200 or 1,234.50), a leading currency sign ($, €, £, ¥ or ₹), a trailing percent sign, or an accounting negative in brackets such as (310). A comma is only read as a thousands separator when the groups are three digits, so 1,23 is reported as not a number rather than read as 123 or 1.23.

Semicolon- and tab-separated files are not split into columns by this tool; the whole line ends up in one column. Re-save such a file as comma-separated first. Blank lines are skipped, and spaces around each cell are trimmed. Files with a UTF-16 byte-order mark are decoded as UTF-16; anything else is read as UTF-8.

In the output, share_percent and cumulative_percent are written with two decimals and no percent sign, so a spreadsheet treats them as numbers you can chart or filter. The value column holds the number the tool actually used, with currency signs and separators removed, so you can check that $1,234.50 was read as 1234.5.

How it works

When you pick a file, the page first looks at its first 8 KB. A file with a NUL byte there is almost certainly a spreadsheet or archive, not text, so it is refused before anything else is read. Files over 25 MB are refused next. The text is then split into rows and columns in the page.

On Run, every value cell is parsed. Only values above zero go into the total. Those rows are sorted from largest to smallest, and for each one the tool adds its value to a running sum and divides by the total to get the cumulative percent. A row is class A while that cumulative percent is at or below the A cut-off, class B while it is at or below A plus B, and class C after that. The last ranked row is always set to exactly 100.00 so rounding cannot leave the total at 99.99.

One exception keeps the result sensible: if the largest item alone is above the A cut-off (say one customer is 90% of revenue and A is 80), it is still put in class A. Without that rule, the most important item in the file would be labelled B or C.

Rows whose value is zero, negative, empty or unreadable are appended after the ranked rows, in that order, all as class C. Zeros get a share of 0.00 and a cumulative of 100.00; the others get empty percentage cells because a share of a positive total is meaningless for them. The whole calculation, the preview and the CSV download happen inside the browser tab.

Common use cases

  • A maintenance stores supervisor exports twelve months of part issues with unit cost, adds a spend column, and uses the A list to decide which 40 bins get a monthly cycle count instead of the yearly stocktake.
  • A small online shop ranks products by gross margin rather than revenue, to see whether the products it advertises most are really the ones in class A.
  • A purchasing team ranks suppliers by invoiced spend and picks the class A suppliers for the next round of contract talks, leaving class C suppliers on standard terms.
  • An accounts receivable clerk ranks customers by overdue balance so that collection calls start with the handful of accounts that hold most of the money.

How to use this tool

  1. Choose your CSV, drop it on the upload area, or press Use sample data to try the tool on a ten-item spend list.
  2. Check the Item column (the SKU, product name or customer) and the Value column the tool pre-selected.
  3. Leave the cut-offs at 80 and 15 or type your own. The line under the boxes spells out where A, B and C begin.
  4. Press Run ABC analysis and read the summary table first: how many items are in A, and what share of value they carry.
  5. Scroll the ranked preview and the list of rows left out of the total, if any.
  6. Press Download to save the sorted CSV with the class column.

Example

Annual spend on ten maintenance parts (spend.csv)

sku,annual_spend
P-104,48200
V-221,3150
G-018,2400
F-330,9600
B-512,1800
S-077,950
M-640,22400
C-115,310
H-902,4700
T-033,0

spend-abc.csv with A at 80 and B at 15 (total 93,510)

item,value,share_percent,cumulative_percent,class
P-104,48200,51.55,51.55,A
M-640,22400,23.95,75.50,A
F-330,9600,10.27,85.77,B
H-902,4700,5.03,90.79,B
V-221,3150,3.37,94.16,B
G-018,2400,2.57,96.73,C
B-512,1800,1.92,98.65,C
S-077,950,1.02,99.67,C
C-115,310,0.33,100.00,C
T-033,0,0.00,100.00,C

Summary: A 2 items, 75.50% of value; B 3 items, 18.66%; C 5 items, 5.84%.
Reported: data row 10 (T-033) is zero.

Tips for best results

  • Rank on value, not quantity. Ten thousand washers at a few cents each can outnumber every other line in a stock file and still be class C once you multiply by cost. Add a quantity times unit cost column before running the tool.
  • Aggregate first. If your export has one row per transaction, the same SKU appears many times and each row is ranked separately. Group by item and sum the value (a pivot table or a group-by tool) so each item has one row.
  • Try a second set of cut-offs before acting. Running the same file at 70/20 and at 80/15 shows which items sit near a boundary; those are the ones to look at by hand.
  • Keep the downloaded file next to the source export with the date in its name. ABC classes drift as demand changes, and comparing this quarter's classes with last quarter's shows which items moved.

Common pitfalls

The A class can hold less value than the cut-off suggests. In the example, A stops at 75.50% because adding the next item (F-330) would take the running total to 85.77%, above 80. The rule is at-or-below, so an item that straddles the line goes into the lower class. If you would rather include the straddling item, raise the A cut-off slightly.

With few items, B can come out empty. If the A boundary is crossed by a large item that jumps the cumulative percent from 80 straight past 95, no row falls inside the B band. That is arithmetic, not a fault; with a list of 5 items the three-way split is rarely meaningful anyway.

Returns and credits shown as negative values are taken out of the ranking and the total. If a product had 5,000 of sales and 600 of returns on separate rows, net them per item before running the analysis, or the returns row will be reported as negative and the product will be ranked on gross sales.

Duplicate column names in the header row collide: the later column's values replace the earlier one's. Rename one of them before loading the file if both matter.

Common errors and how to fix them

"This looks like a binary file, not a text CSV. Choose a CSV file."
The file is probably an .xlsx or .xls that was renamed, or a CSV saved inside a zip. Open it in your spreadsheet program and use Save As with the CSV (comma delimited) format.
"No row in "amount" holds a number above zero, so there is no total to rank against."
Either the wrong value column is selected (for example a text column of product names) or every value is zero or negative. Check the column choice, and check that numbers do not use a comma as the decimal mark, such as 12,5, which is not read as a number.
"A (85%) plus B (20%) is more than 100%. Lower one of them."
The B box is the width of the B band, not the point where B ends. With A at 85, a B of 10 makes B end at 95%. The Run button stays disabled until the two add up to 100 or less.
Most rows are listed as "not a number".
The value cells probably carry text such as "USD 450" or a unit like "450 kg". Only a single leading currency symbol is stripped. Clean the column first so each cell holds just the number.

Best practices

  • Write down the cut-offs you used next to the result. A list labelled class A means little to a colleague who does not know whether A meant 70% or 80%.
  • Use a full year of data where you can. A single month can put a seasonal item in class A in December and class C in June.
  • Treat the classes as a starting point for a decision, not the decision. A cheap part that stops a production line when it runs out may deserve class A treatment whatever its spend.
  • Check the reported rows before you share the output. A dozen empty value cells often means a broken export, and the items in them are sitting in class C for the wrong reason.

Choosing the cut-offs

There is no correct split. The 80/15/5 default comes from the Pareto observation that a small share of causes often accounts for most of an effect. Some teams prefer 70/20/10 to get a smaller class A, or define the classes by item count instead of value (top 10% of items are A). This tool only does the value-based version.

A useful way to choose is to look at the cumulative_percent column in the downloaded file and find where the curve flattens. If the first eight items reach 78% and the next eight add only 6%, a cut-off near 78 or 80 separates two genuinely different groups. If the curve rises evenly, the classes will be arbitrary whichever numbers you choose, and ABC may not be the right lens for that list.

ABC by value, without XYZ, charts or grouping

It does not combine ABC with a second dimension such as demand variability (the XYZ method) or criticality. It does not draw a Pareto chart; the cumulative_percent column is there so you can plot one in your spreadsheet in a few clicks. It does not group rows by item, so a transaction-level export must be summarised first.

  • One value column per run; run the file again to rank on a different measure
  • Comma-separated input only
  • Files up to 25 MB

Frequently asked questions

Why is my biggest item in class A when it alone is above the A cut-off?

Strict application of the rule would put it in B or C, because its cumulative percent (its own share) is already above the cut-off. That would label the single most valuable item as less important than smaller ones, so the first ranked row is always class A when its own share exceeds the A cut-off. Every later row follows the normal rule.

How are ties ranked?

Items with exactly the same value keep the order they had in your file. If two items of 950 sit on either side of a class boundary, the one nearer the top of the original file gets the higher class. Sort the file the way you prefer before loading it if that matters.

Can I rank by more than one column, such as revenue and margin together?

Not in one run. Either add a combined column to the file first (for example revenue times margin percent) and rank on that, or run the analysis once per measure and compare the two class columns side by side.

Why does a zero-value item show 100.00 as its cumulative percent?

Zero adds nothing to the running total, so once all positive values are counted the cumulative percent is 100 and stays there. The row is still reported in the list under the result so you can decide whether it should be in the file at all.