Unit Price Calculator

Items to compare

Price per unit

Pack A
0.465per oz
Pack B Best value
0.4163per oz

Unit Price Calculator – Compare Price per Unit

Unit Price Calculator works out the price per unit for each package so you can see at a glance which one is the better deal. Type a unit label such as oz, g, or ct, enter each item's price and quantity, and the lowest unit price is highlighted automatically. Everything is calculated live in your browser — nothing is uploaded.

How to use the unit price calculator

Comparing package sizes takes four steps, and the results update as you type.

① Set the unit label you are comparing by — oz, g, ml, ct, or anything else you like.

② Enter each item's price and quantity in that same unit.

③ Add more items with the + Add item button — there is no limit on how many you can compare.

④ Read the highlight: the item with the lowest unit price is marked Best value in green.

How unit price is calculated

Unit price = price ÷ quantity. A $2.79 pack containing 6 ounces works out to 2.79 ÷ 6 ≈ $0.47 per ounce, while a $9.99 pack containing 24 ounces works out to 9.99 ÷ 24 ≈ $0.42 per ounce — so the larger pack is the better deal even though it costs more. Results are shown with 2 to 4 decimal places so close calls stay visible, and a quantity of zero displays — instead of a number.
  • Do the units have to match? Yes. The calculator compares the numbers you enter and does not convert between measurement systems. Convert grams to ounces (or the other way round) first, then enter both quantities in one consistent unit.
  • Why does the best value change while I edit? Every keystroke recalculates all unit prices, so the highlighted card always reflects the current numbers.
  • What if two items tie? When two unit prices are exactly equal, the item higher in the list keeps the best-value highlight.
  • Can I compare more than two items? Yes — add as many rows as you need, from two upwards with no limit.

When to use it

🛒 Grocery shopping: compare a 6 oz pack against a 24 oz pack, or a single roll against a multipack, and buy by unit price instead of sticker price.

📦 Bulk and wholesale: check whether the larger case really is cheaper per unit before committing to a bigger order.

🌍 Cross-border shopping: normalise prices into one unit when listings use grams, ounces, millilitres, or counts.

🧾 Subscriptions and refills: compare cost per unit across different pack sizes of the same product.

Privacy & accuracy

This tool runs entirely in your browser with JavaScript. Your prices and quantities are never transmitted or stored, so nothing leaves your device. Results are rounded for display only, so treat the highlighted best value as a guide and confirm it against the shelf label before you buy.