Unit Price Calculator: How to Compare Real Cost Per Unit
ByMuhammad Ali•Founder of KruskalCode
05:33
6 min read

Shoppers in the US and UK often face two prices that are hard to eyeball: a smaller pack that looks cheaper at the till versus a larger pack with a higher sticker price. Unit pricing divides total price by the amount you get—millilitres, grams, fluid ounces, or pounds—so you can judge fairness the same way a classroom ratio problem does.
Explanation
Retail labels sometimes highlight multi-buys or loyalty prices, but the decisive number for value is still cost per unit. When both items are measured with the same unit, dividing price by size removes the distraction of pack shape or brand claims. This mental model is standard consumer mathematics: it is educational only and does not replace reading the full label, checking quality, or budgeting choices that depend on how much you can store.
Formula
Unit price = Total price ÷ Size (using identical units for both products). If unit price A is less than unit price B, offer A is the better value on a per-unit basis.
Example
Imagine a £3.60 bottle with 750 ml and a £4.20 bottle with 1000 ml. The first costs 3.60 ÷ 750 = £0.00480 per ml; the second costs 4.20 ÷ 1000 = £0.00420 per ml. The larger bottle wins on unit price. In dollars, the same arithmetic applies: $5.49 for 12 fl oz versus $7.99 for 20 fl oz—convert both to the same volume unit first, then divide.
How to use the related calculator
Open the Unit Price Comparator on the tool page and type price and size for each offer in the same measure. Use plain numbers only—currency symbols are optional outside the fields. Read the first two lines as cost per one unit of that measure, then check which offer the tool labels as the better buy. If the numbers look odd, confirm you did not mix litres with millilitres or ounces with grams.
Try the related calculator
Open toolFAQ
Why must both sizes use the same unit?
The calculator divides each price by its size. If one row is in litres and the other in millilitres, one side is 1000 times smaller without you noticing, which would pick the wrong winner.
Does the lowest total price always mean the best deal?
No. A cheaper small pack can cost more per millilitre than a bulk container. Unit price reveals that difference.
Can students use this for homework?
Yes. Teachers often frame these as ratio or rate problems. Enter your numbers to check your hand calculation.
Related articles

About the author
Muhammad Ali. Muhammad Ali is a full-stack developer and founder of KruskalCode. He builds SaaS platforms and automation systems with React and Laravel, and helps teams ship fast, scalable tools.
Need a custom calculator, dashboard, or automation workflow? Reach out to KruskalCode.