Unit Price Calculator

Price Per Gallon

Milk, juice, iced tea, and paint are often priced per gallon — but the shelf is full of half-gallons, quarts, and liter bottles too. To compare them fairly, convert every container to the same basis and divide price by size. Price per gallon is just a unit price where the unit is one gallon (128 fluid ounces).

Convert everything to gallons

Calculating price per gallon

Divide the container's price by its size in gallons.

A half-gallon of milk is $2.79.
$2.79 ÷ 0.5 = $5.58 per gallon

Worked comparison: gallon jug vs. quart carton

The big jug usually wins on unit price, but not always — sales on smaller sizes can flip the result. Run the math both ways before assuming.

Gallon jug: $4.49 → $4.49 ÷ 1 = $4.49 per gallon.
Quart carton on sale: $1.05 → $1.05 ÷ 0.25 = $4.20 per gallon.
→ the quart cartons are cheaper at $4.20 per gallon

Metric containers: liters to gallons

Imported drinks and many juices come in liters. Multiply the liter price by 3.785 (liters per gallon) to get the per-gallon equivalent, or divide by 0.264 (gallons per liter).

A 2-liter bottle of soda is $2.29.
2 L = 0.528 gal → $2.29 ÷ 0.528 = about $4.34 per gallon

Watch out for these

See price per fluid ounce for the smaller-unit version of this method, or use the unit price calculator to convert and compare automatically.