Worked examples
A smaller package can cost less to buy and more per unit.
All prices in an example use the same currency. The numbers are invented for arithmetic checks; they are not live product prices or recommendations. For one ordinary package, use a contained-unit count of 1.
1. 750 g versus 1 kg
Offer A costs 4.80 for 750 g. Convert 750 g to 0.75 kg, then divide 4.80 ÷ 0.75 = 6.40 per kg. Offer B costs 6.20 for 1 kg, so its rate is 6.20 per kg. Offer B is lower by 0.20 per kg.
The whole package A still costs only 4.80, compared with 6.20 for B. The unit-price result does not say that B requires a smaller checkout payment or that you will use its extra contents.
2. A six-bottle offer
Offer A costs 7.50 for 6 identical bottles of 250 mL. Total content is 6 × 250 = 1500 mL = 1.5 L. Its rate is 7.50 ÷ 1.5 = 5.00 per L. Offer B costs 4.80 for 1 L, so B is lower by 0.20 per L.
Enter 7.50 once as A’s total price. Entering 7.50 as a price for each bottle would describe a different offer; this calculator does not multiply the price by the contained-unit count.
3. Whole-item counts
Offer A costs 6.00 for 24 similar items, giving 0.25 per item. Offer B costs 9.00 for 40 similar items, giving 0.225 per item. B has the lower rate by 0.025 per item, while requiring the larger whole-offer payment.
You can enter one box containing 24 items, or two identical boxes containing 12 items each, if the price describes the whole offer. Both represent 24 items. A fractional item quantity is rejected.
4. A true tie across different units
Offer A costs 3 for 500 g; Offer B costs 6 for 1 kg. A’s quantity is 0.5 kg, and 3 ÷ 0.5 = 6. Both rates are exactly 6 per kg. The calculator reports an exact unit-price tie and an absolute difference of 0.
5. Free entered offers
If A’s total price is 0 and its quantity is positive, its unit price is 0. A positive-priced comparable offer has a higher unit price. If both prices are 0, they tie. No percentage calculation is attempted, so no zero reference price needs to become a denominator.
6. Rounded rates can look equal
Consider A priced at 1 for 1000000000 kg, and B priced at 1 for 999999999.999999 kg. This is a numerical boundary example, not a realistic purchase. A is exactly 1/1000000000 per kg. B is a slightly larger fraction because its denominator is a little smaller.
At 12 significant digits the displayed rates can look alike. The exact comparison still identifies A’s lower rate and shows a note explaining the rounded appearance. JSON retains both exact fractions and the positive difference.
7. Keep unlike quantities separate
A 500 g price and a 500 mL price do not describe the same dimension. Packcompare rejects incompatible units. It does not assume that a litre has a particular mass or that two concentrations deliver the same usable quantity.