acalculator

What is the unit price?

Enter the price and size of an item to see its price per unit. Add a second item, even in another unit such as grams against pounds, to see which one is the better buy.

Your numbers

Item A price per unit
$0.2908

Item A, $3.49 for 12 oz, costs $0.2908 per oz.

Item B price per unit
$0.2496
Better buy
Item B
Cheaper per unit by
14.18%

Item A price per unit: $0.2908. Item A, $3.49 for 12 oz, costs $0.2908 per oz.

How to calculate

Works out the price per ounce, pound, gram, liter, or item of a product, and compares two sizes or brands to show the better buy and how much cheaper it is.

Example with the default inputs (Item A price $3.49, Item A size 12, Item A unit oz, Item B price $5.99, Item B size 24, Item B unit oz): Item A, $3.49 for 12 oz, costs $0.2908 per oz.

Method: unit price = price ÷ size; the better buy is the item with the lower price per unit after converting both sizes to one unit

  • Sizes convert exactly: 1 lb = 16 oz = 453.59237 g, 1 gal = 4 qt = 8 pt = 128 fl oz = 3.785411784 L.
  • Weights (oz, lb, g, kg), volumes (fl oz, pt, qt, gal, mL, L) and counts (ct) cannot be compared with each other.
  • Unit prices are exact from the typed decimals; two count as the same when they differ by at most one billionth of the higher one.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Item A price $3.49, Item A size 12, Item A unit oz, Item B price $5.99, Item B size 24, Item B unit oz gives Item A price per unit $0.29, Item B price per unit $0.25, Better buy Item B, Cheaper per unit by 14.183381%.Source: NIST SP 1181, Unit Pricing Guide (2025 edition): the unit price is the price per unit of measure (https://www.nist.gov/publications/nist-sp-1181-unit-pricing-guide-best-practice-approach-unit-pricing-2025-ed)
  2. Item A price $4.99, Item A size 1, Item A unit lb, Item B price $2.79, Item B size 500, Item B unit g gives Item A price per unit $4.99, Item B price per unit $0.01, Item B per item A’s unit $2.53, Better buy Item B, Cheaper per unit by 49.277647%.Source: NIST SP 811 (2008), Appendix B: 1 lb = 453.59237 g exactly
  3. Item A price $2.50, Item A size 64, Item A unit fl oz, Item B price $3.99, Item B size 1, Item B unit gal gives Item A price per unit $0.04, Item B per item A’s unit $0.03, Better buy Item B, Cheaper per unit by 20.2%.Source: NIST SP 811 (2008), Appendix B: 1 gal = 128 fl oz
  4. Item A price $6.00, Item A size 12, Item A unit ct, Item B price $9.00, Item B size 18, Item B unit ct gives Item A price per unit $0.50, Item B price per unit $0.50, Better buy Both the same.

How it works

Each item has a price of 0 or more, a size of at least 0.000001, and a unit: a weight (oz, lb, g, kg), a volume (fl oz, pt, qt, gal, mL, L), or a count of items (ct). Units convert exactly: 1 lb = 16 oz = 453.59237 g; 1 US gallon = 4 qt = 8 pt = 128 fl oz = 3.785411784 L; 1 L = 1,000 mL.

  • Price per unit of each item = price ÷ size, per one of its own units.
  • To price one item, leave item B’s price and size empty. Filling in only one of them has no answer.
  • To compare, both items must be weights, both volumes, or both counts; otherwise there is no answer.
  • Item B per item A’s unit (shown when the units differ) = item B’s price ÷ (its size converted to item A’s unit).
  • Better buy is the item with the lower price per unit, both converted to one unit. Both are worked out exactly from the typed prices and sizes. Two unit prices count as the same when the higher one minus the lower one is at most one billionth of the higher one (at the boundary too), and the result reads “Both the same”.
  • Cheaper per unit by = (higher unit price − lower unit price) ÷ higher unit price × 100, shown when one is cheaper.

Unit prices show to 4 decimal places of a dollar and the percent to 2 decimal places, both rounded half up.

Worked examples by hand

12 oz for $3.49 against 24 oz for $5.99. Item A: 3.49 ÷ 12 = $0.2908 an ounce. Item B: 5.99 ÷ 24 = $0.2496 an ounce. Item B is the better buy, cheaper by (0.29083 − 0.24958) ÷ 0.29083 × 100 = 14.18%.

1 lb for $4.99 against 500 g for $2.79. Item A: $4.99 a pound. Item B: 2.79 ÷ 500 = $0.0056 a gram; 500 g is 500 ÷ 453.59237 = 1.1023 lb, so item B costs 2.79 ÷ 1.1023 = $2.5310 a pound. Item B is cheaper by (4.99 − 2.531) ÷ 4.99 × 100 = 49.28%.

64 fl oz for $2.50 against 1 gallon for $3.99. Item A: 2.50 ÷ 64 = $0.0391 a fluid ounce. A gallon is 128 fl oz, so item B is 3.99 ÷ 128 = $0.0312 a fluid ounce. Item B is cheaper by (0.0390625 − 0.031171875) ÷ 0.0390625 × 100 = 20.20%.

12 for $6 against 18 for $9. Both are 6 ÷ 12 = 9 ÷ 18 = $0.50 an item: both the same.

Other questions people ask

How do I calculate a unit price?

Divide the price by the size. A 12 oz box for $3.49 costs $3.49 ÷ 12 = $0.2908 an ounce. Many stores show the same number on the shelf tag so you can compare sizes.

How do I tell which size is the better buy?

Compare the unit prices in the same unit. A 12 oz box at $3.49 is $0.2908 an ounce and a 24 oz box at $5.99 is $0.2496 an ounce, so the big box is cheaper per ounce, by 14.18%.

Can I compare items sold in different units?

Yes, if both are weights, both are volumes, or both are counts. The calculator converts item B’s size to item A’s unit: 500 g at $2.79 is $2.5310 a pound, against $4.99 a pound for item A. A weight cannot be compared with a volume, because that needs the product’s density.

What does “cheaper by” mean?

It is how much lower the better buy’s unit price is, as a percent of the other item’s unit price: (higher − lower) ÷ higher × 100.

Is the bigger pack always cheaper?

No. Sales, coupons and store brands often make a smaller pack cheaper per unit, which is why it is worth checking. A bigger pack is also only a saving if you use it before it goes off.

How precise are the results?

Unit prices show to a hundredth of a cent (4 decimal places) and the percent to 2 decimal places, both rounded half up. Two unit prices count as the same when they differ by at most one billionth of the higher one.