piapia123
en

Unit Price Comparison

Convert

Everything runs locally in your browser — nothing is uploaded

Input
Drop a file here to load its contents
Output

Write one “name price quantity” per line, e.g. `Large 19.9 1000`. The right-hand side converts each line to a price per unit, sorts them cheapest first, marks the best value and shows how much more expensive the others are in percent. The classic mistake in comparing is comparing totals. A big pack looks dearer, but it holds more — so the output here is a price *per unit*, not a total. Once it is laid out as its own column, which one wins is obvious without mental division. “12% more” beats “19.9 versus 22.5”. Two absolute numbers have to be compared by hand; a percentage tells you directly whether it is worth walking an extra aisle for a different size. The discount is an option, not a second input format. “Which is better value after 20% off” is the same question, so the discount is an option that multiplies every price — a separate format would turn “do I write the before or after price here?” into a question nobody can answer. ⚠️ Spend-threshold discounts are not here. “Spend 200, get 30 off” depends on how much you buy in total, and unit-price comparison assumes the lines are independent. Forcing it in would produce a figure that looks as precise as a unit price while actually depending on your basket — exactly the kind of claim this tool should not make. ⚠️ One bad line does not wipe out the table. Lines that cannot be read are listed separately with the expected format, and the rest are still computed — losing every result to one typo is the worst possible behaviour when comparing prices.

Features

  • Sorted by unit price (never by total), with the best value marked automatically
  • Every other line shows how much more it costs, in percent
  • Optional discount applied to all prices at once (the ranking cannot change)
  • With a unit name, an extra “per 100” column — 0.0199 versus 0.0396 means counting decimals, 1.99 versus 3.96 does not
  • Names may contain spaces (the last two numbers are read as price and quantity)
  • Accepts spaces, commas and tabs, so you can paste straight from a table
  • A bad line affects only itself, and the result says which line and why
  • The verdict is in the result itself, so it survives copying
  • Computed locally; nothing is uploaded

How to use

  1. One “name price quantity” per line (the name is optional and may contain spaces)
  2. The right-hand side sorts by unit price and marks the best value
  3. Add a discount or a unit name if you need them
  4. Switch the sort order when you want to check against your original list

FAQ

What units should the quantity be in?
Whatever unit you like, as long as every line uses the same one — the lines must be the same product measured the same way. Comparing millilitres with litres gives unit prices that are not comparable, while the output still looks perfectly normal. Write 500 ml and 1 L as `500` and `1000`. The unit-name field only affects the wording of the result (“per 1 ml”); it does not change the arithmetic.
Why do the other lines lose their percentage when something is free?
Because the lowest unit price is then 0, and “divide by 0 and subtract 1” has no answer. More importantly, using “the percentage is 0” as the test would mark every line as best value — a self-contradictory result. So when a free item (a gift, a points redemption) is present, only it is marked best value and the rest carry no percentage.
Does a discount change the ranking?
No. A discount multiplies every price by the same factor, and multiplying by a positive number does not change which is smaller. So the discount changes the unit prices but never which line is better value — which is exactly why it belongs as an option rather than as a second input format.
Can I use this for “spend 200, get 30 off”?
No, and the tool deliberately does not try. A spend threshold depends on your whole basket and how you split it, whereas unit-price comparison assumes the lines are independent. Working it in would give a number that is only true for one particular basket while looking as precise as a unit price — and the reader would have no way to tell. For thresholds, just work out the total and the amount paid; that needs no comparison.

Related tools