What this calculator does
Unit price comparison works out which pack is actually cheaper per unit. Enter your own figures above and the answer updates as you type: nothing is fixed in the code, so the result reflects exactly the numbers you supply.
The formula this calculator evaluates is printed under the tool and explained below, so you can check the working by hand or reuse it in a spreadsheet.
The formula
FormulaUnit price = price / quantity; compare across pack sizes
The inputs explained
| Field | What to enter |
|---|---|
| Product A: price ($) | A number, measured in your currency. Starts at 4.5. |
| Product A: size (g/ml) | A number, measured in g/ml. Starts at 500. |
| Product B: price ($) | A number, measured in your currency. Starts at 7.8. |
| Product B: size (g/ml) | A number, measured in g/ml. Starts at 1000. |
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How the answer changes with product a: price
Every other input is held at the calculator’s starting values while product a: price varies. Select any row to load that scenario into the calculator.
How the answer changes with product a: price
| Product A: price ($) | Better value | A: per unit | B: per unit |
|---|---|---|---|
| 2.25 | Product A | 0.0045 per unit ($0.45 per 100) | 0.0078 per unit ($0.78 per 100) |
| 3.38 | Product A | 0.0068 per unit ($0.68 per 100) | 0.0078 per unit ($0.78 per 100) |
| 4.5 | Product B | 0.0090 per unit ($0.90 per 100) | 0.0078 per unit ($0.78 per 100) |
| 6.75 | Product B | 0.0135 per unit ($1.35 per 100) | 0.0078 per unit ($0.78 per 100) |
| 9 | Product B | 0.0180 per unit ($1.80 per 100) | 0.0078 per unit ($0.78 per 100) |
| 13.5 | Product B | 0.0270 per unit ($2.70 per 100) | 0.0078 per unit ($0.78 per 100) |