Money calculator

Unit Price Calculator

Compare two package prices fairly, even when compatible unit sizes differ.

Best value

—

Product A—
Product B—
Difference per unit—
Percentage difference—

How the two products get compared

Each product gets a total price, a quantity, and a unit. Units are grouped into four families: item count (item), US mass (oz, lb), metric mass (g, kg), and volume (mL, L). Every unit in a family converts to a shared base — ounces for US mass, grams for metric mass, milliliters for volume — before the price is divided by quantity, so a price in pounds and a price in ounces land on the same per-ounce scale automatically.

If the two products use units from different families — say ounces against milliliters, or items against grams — the calculator shows an alert instead of a result. Mass, volume, and item counts aren't convertible into each other without knowing the product's density, which the tool doesn't ask for, so it refuses to guess.

A quantity of zero or a blank price is also rejected for whichever product is incomplete; that product just shows no unit price rather than blocking the other one.

The normalization formula

Unit price = Total price ÷ (Quantity × Unit factor)

The factor turns any unit into its family's base unit: 1 for oz, 16 for lb (there are 16 oz in a lb); 1 for g, 1,000 for kg; 1 for mL, 1,000 for L; 1 for item. $10 for 5 items is 10 ÷ (5 × 1) = $2.00/item, and $12 for 8 items is 12 ÷ (8 × 1) = $1.50/item, so the 8-pack is 33.33% cheaper per item.

Mixed units in the same family work the same way: $4.29 for 20 oz of peanut butter is $4.29 ÷ 20 = $0.2145/oz, while $6.49 for a 2 lb jar is $6.49 ÷ (2 × 16) = $6.49 ÷ 32 = $0.2028/oz. The 2 lb jar is 5.76% cheaper per ounce even though its sticker price is higher.

Where unit-price comparisons go wrong

The most common trap is comparing a per-item price to a per-weight price without noticing the mismatch — a 12-pack priced per item tells you nothing against a bulk bag priced per ounce unless you also know the weight of one item. This tool sidesteps that by refusing to compare across families rather than silently dividing item count by weight.

A second trap is trusting a shelf tag's stated unit without checking it matches the other product's tag; stores sometimes post 'price per ounce' on one item and 'price per pound' on another on the same aisle. Entering the printed total price and quantity yourself, rather than trusting a pre-computed unit price, avoids inheriting that inconsistency.

The percentage-difference figure is always calculated against the cheaper of the two prices, not against whichever product you entered first, so it answers 'how much more does the pricier option cost, relative to the cheaper baseline' regardless of input order.

Everyday comparisons this handles

A few concrete pairs, with the exact numbers the calculator returns:

  • Peanut butter jars – $4.29 for 20 oz ($0.2145/oz) vs $6.49 for 2 lb ($0.2028/oz): the 2 lb jar wins by 5.76%
  • Battery multipacks – $10.00 for a 5-pack ($2.00/item) vs $12.00 for an 8-pack ($1.50/item): the 8-pack wins by 33.33%
  • Bagged rice – $4.50 for 900 g ($0.0050/g) vs $7.20 for 1.5 kg ($0.0048/g): the 1.5 kg bag wins by 4.17%
  • Bottled drinks – 750 mL for $3.00 ($0.0040/mL) vs 1.5 L for $5.40 ($0.0036/mL): the 1.5 L bottle wins by 11.11%
  • Incompatible pairing – comparing 12 oz of shampoo priced by mass against a 500 mL bottle priced by volume trips the unit-family alert instead of returning a misleading number

Frequently asked questions

Why did I get a "choose compatible units" warning?

The two products are in different unit families. Item counts, US mass (oz/lb), metric mass (g/kg), and volume (mL/L) are each their own family, and the calculator only converts within a family — it never turns a weight into a volume or an item count into either.

What does the unit price mean when I select "item"?

The factor for "item" is 1, so the unit price is simply total price divided by quantity — dollars per individual unit. That's the right choice for eggs, diapers, K-cups, or anything sold and used one at a time rather than by weight or volume.

Can I compare a price in ounces directly to a price in pounds?

Yes. Both belong to the US mass family, and the calculator multiplies the pound quantity by 16 to convert it to ounces before dividing, so a $6.49, 2 lb jar is compared as $6.49 ÷ 32 oz, not $6.49 ÷ 2.

Why does the percentage difference stay the same if I swap Product A and Product B?

It's calculated relative to whichever unit price is lower, not relative to Product A specifically, so reordering the two products changes only the labeling in the result, not the percentage itself.

Does the calculator apply coupons or store discounts for me?

No — enter the price you'd actually pay after any discount, tax, or coupon is already applied. The tool only divides price by quantity; it doesn't subtract percentages or dollar-off amounts.

How precise are the unit prices shown?

Up to four decimal places, so two prices need to differ by at least $0.0001 per base unit to show as different. That precision matters most for cheap-per-unit items like rice or laundry detergent, where the raw per-ounce gap can be a fraction of a cent.