What is the Unit Price Comparison Calculator?
This tool helps you decide which of two or three products is the better buy when they contain the same thing but come in different sizes and prices. By dividing each product's price by its quantity, it produces a unit price (the cost per single gram, milliliter, or piece). The product with the lowest unit price is the most economical choice. It is widely used at the supermarket to compare different bottle sizes of instant coffee, laundry detergent, shampoo, snacks, and more.
How to use it
For each product, enter its price and its quantity or volume. The single most important rule: enter the quantity for every product in the same unit — all in grams, or all in milliliters, or all in pieces. The tool does not convert units for you, so mixing grams with kilograms would give a meaningless result. Product C is optional; leave it blank to compare just two products.
The formula explained
The unit price of each product is simply price divided by quantity.
$$\text{Unit Price} = \frac{\text{Price}}{\text{Quantity}}$$The calculator rounds each unit price to four decimal places (rounding half up on the fifth decimal). It then finds the minimum unit price across all products and reports that product as the best value. It also shows the percentage savings of the cheapest option versus the most expensive per-unit option.
$$\text{Savings \%} = \frac{\text{Worst Unit Price} - \text{Best Unit Price}}{\text{Worst Unit Price}} \times 100$$
Worked example
Product A costs 300 for 200 g, so its unit price is \(300 / 200 = 1.5\) per gram. Product B costs 500 for 350 g, so its unit price is \(500 / 350 = 1.4286\) per gram (rounded to 4 decimals). Since 1.4286 is less than 1.5, Product B is the better value. The savings versus the worst per-unit price is
$$\frac{1.5 - 1.4286}{1.5} \times 100 = 4.76\%$$cheaper per gram.
FAQ
Does the currency matter? No. The tool only compares ratios, so the currency symbol has no effect on which product wins.
What if a quantity is zero? Division by zero is undefined, so a product with zero quantity is treated as invalid and excluded from the ranking. Use a positive quantity.
What if the units differ between products? The result will be wrong. Always convert everything to one common unit before entering the numbers (for example, express both as grams).