logic.codes

Unit Price Comparison Calculator

Which package is the better deal per ounce, pound, liter or item?

Single calculationv1.0.0Verified 2026-11-01Runs in your browser

Spec sheet

unit_price · v1.0.0
Method

Price ÷ quantity in a common unit

  1. 01q_B in A's unit = convert(q_B, unit_B → unit_A)
  2. 02unit price = price ÷ quantity
Limits — read before relying on it
  • Weight and volume cannot be compared with each other (e.g. fl oz vs oz) without a density.
  • US gallons.
Sources
  • Dimension-checked unit conversion (NIST SP 811 factors)standard

Worked example

computed by the same formula

12 oz for $3.00 vs 1 lb for $3.50

Inputs
Item A price
3
Item A size
12
Item A unit
ounce (oz)
Item B price
3.5
Item B size
1
Item B unit
pound (lb)
Result
Better value
Item B
Item A price per unit
$0.25
Item B price per unit (same unit)
$0.22
Cheaper by
12.5 %
Compared per
oz
  1. 1. Item B size in oz = 16

Questions

How is the unit price comparison calculated?

›

Price ÷ quantity in a common unit. q_B in A's unit = convert(q_B, unit_B → unit_A) · unit price = price ÷ quantity

Example: 12 oz for $3.00 vs 1 lb for $3.50?

›

Better value: Item B; item a price per unit: $0.25.

What does this calculator not cover?

›

Weight and volume cannot be compared with each other (e.g. fl oz vs oz) without a density. US gallons.

Where do the numbers come from?

›

Sources: Dimension-checked unit conversion (NIST SP 811 factors). The formula is versioned (unit_price v1.0.0) and covered by automated tests.

Is my data stored?

›

No. The calculation runs in your browser and nothing is sent unless you choose to save a shareable link.

Also searched asunit price calculator · price per ounce · which is cheaper per pound · compare prices by size · best value calculator

Related

More personal & life calculators