About this tool
The unit price calculator compares two packages by dividing each price by its quantity, so you can see which one costs less per item, gram, liter, or pound. Shoppers use it when comparing bulk packs with smaller sizes or two brands on the shelf. Unit price is the price of one unit of quantity, and the option with the lower unit price is cheaper for the same amount.
How it works
Enter the price and quantity of package A and package B, then pick the unit both quantities use: items, kilograms, grams, pounds, liters or milliliters. If the labels use different units, convert one quantity before entering it.
The calculator divides each price by its quantity to get two unit prices, then shows the absolute difference and the saving as a percentage of the higher unit price. The cheaper option is the one with the lower unit price. Any currency works as long as both prices use the same one.
Example
With the defaults, package A costs 6 for 2 items and package B costs 10 for 5 items. Unit price A is per item and unit price B is per item, so B is cheaper. The absolute difference is 1 per item. Compared with the higher unit price of 3, B saves , about 33.3333333333%.
Assumptions and limits
Both quantities must be in the same unit and both prices in the same currency; the unit option labels the comparison but does not convert between units. The tool compares two options at a time and ignores coupons, quality differences, and whether you will use the larger quantity.
Frequently asked questions
How do you calculate unit price?
Divide the total price by the number of units in the package. A 3-pound bag for 4.50 costs 1.50 per pound.
How do I compare products sold in different units?
Convert one quantity into the other's unit first. For example, 1 kilogram is 1,000 grams, and 1 pound is about 453.6 grams.
Is buying in bulk always cheaper?
No. Larger packages often have lower unit prices, but not always, especially when the smaller size is on sale. Comparing unit prices shows the actual difference.
How is the savings percentage calculated?
It is the difference between the two unit prices divided by the higher unit price, times 100. In the default example the difference is 1 and the higher unit price is 3, so the saving is about 33.3%. Measuring against the higher price shows how much less you pay per unit by switching to the cheaper option.
Is a 1.5 kg pack for 4.20 cheaper than 500 g for 1.50?
Convert both to grams first: the large pack is 1,500 g. Its unit price is 4.20 / 1,500 = 0.0028 per gram, or 2.80 per kilogram, while the small pack costs 0.003 per gram, or 3.00 per kilogram. The large pack is cheaper by about 6.7% per gram.
Link with your values
Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.
| Parameter | Value | If omitted |
|---|---|---|
item_a_pricePrice of A | amount without a currency symbol; allowed ≥ 0 | required |
item_a_quantityQuantity of A | number; allowed > 0 | required |
item_b_pricePrice of B | amount without a currency symbol; allowed ≥ 0 | required |
item_b_quantityQuantity of B | number; allowed > 0 | required |
quantity_unitUnit for both quantities | one of: items, kg, g, lb, l, ml | default items |
Examples
?item_a_price=6.49&item_a_quantity=0.5&item_b_price=11.99&item_b_quantity=1&quantity_unit=kg
Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.
Result elements: [data-result-block="unit_price_calculator"]