# What is the unit price?

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.

- Page: https://www.acalculator.org/everyday-life/unit-price-calculator
- JSON spec: https://www.acalculator.org/everyday-life/unit-price-calculator.json
- Version: e1c68621ef98

## Default answer

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.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| priceA | Item A price | The price of the first item. |
| sizeA | Item A size | How much the first item holds, in the unit chosen next. |
| unitA | Item A unit | The unit of the size: a weight, a volume, or a count of items (ct). |
| priceB | Item B price | The price of the second item. Leave it empty to price one item. |
| sizeB | Item B size | How much the second item holds, in the unit chosen next. |
| unitB | Item B unit | The unit of the size: a weight, a volume, or a count of items (ct). |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| perA | Item A price per unit | Item A’s price ÷ its size: the price per one of its units. |
| perB | Item B price per unit | Item B’s price ÷ its size: the price per one of its units. |
| perBinA | Item B per item A’s unit | When the units differ: item B’s price per one of item A’s units, for a like-for-like comparison. |
| cheaper | Better buy | The item with the lower price per unit, or both when they are the same. |
| saving | Cheaper per unit by | How much less the better buy costs per unit, as a percent of the other item’s unit price. |

## Method

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

## Assumptions

- 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.

## Worked examples

1. priceA = $3.49, sizeA = 12, unitA = oz, priceB = $5.99, sizeB = 24, unitB = oz gives perA = $0.29, perB = $0.25, cheaper = Item B, saving = 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. priceA = $4.99, sizeA = 1, unitA = lb, priceB = $2.79, sizeB = 500, unitB = g gives perA = $4.99, perB = $0.01, perBinA = $2.53, cheaper = Item B, saving = 49.277647%. Source: NIST SP 811 (2008), Appendix B: 1 lb = 453.59237 g exactly.
3. priceA = $2.50, sizeA = 64, unitA = floz, priceB = $3.99, sizeB = 1, unitB = gal gives perA = $0.04, perBinA = $0.03, cheaper = Item B, saving = 20.2%. Source: NIST SP 811 (2008), Appendix B: 1 gal = 128 fl oz.
4. priceA = $6.00, sizeA = 12, unitA = ct, priceB = $9.00, sizeB = 18, unitB = ct gives perA = $0.50, perB = $0.50, cheaper = Both the same.

## FAQ

### 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.

## Sources

- NIST SP 1181, Unit Pricing Guide: A Best Practice Approach to Unit Pricing (2025 edition), and NIST Handbook 130, Uniform Unit Pricing Regulation: the unit price is the price per unit of measure (per ounce, pound, 100 g, and so on), for comparing package sizes. https://www.nist.gov/publications/nist-sp-1181-unit-pricing-guide-best-practice-approach-unit-pricing-2025-ed
- NIST SP 811 (2008), Appendix B: 1 lb = 453.59237 g, 1 oz = 28.349523125 g, 1 US gallon = 3.785411784 L = 128 fl oz, all exact.
