Divide the total cost by the quantity to get the unit price: $6.40 ÷ 64 fluid ounces = $0.10 per fluid ounce. The method takes one calculation, but the answer only means something when both packages use the same unit, when the quantity is the net amount you actually receive, and when you've converted everything to a base of 1. Consumer unit prices on US shelf labels follow the National Institute of Standards and Technology's retail pricing guidance, which is mandatory in some states but voluntary in others — so the figure you see on a tag isn't guaranteed to be there, and isn't guaranteed to be right for your comparison.

The Three-Number Formula and Where Each Number Comes From

Unit price = total cost ÷ quantity. That's the whole engine. The hard part is knowing which quantity to divide by, because "quantity" on a package can mean count, net weight, drained weight, or the number of servings the manufacturer wants you to think you'll get.

Start with total cost as the amount actually leaving your account. That includes sales tax in most places and excludes manufacturer coupons applied after the register rings the item, depending on your jurisdiction's rules. If you're modeling a purchase for a business, use landed cost — product price plus freight plus duties — because Shopify's 2026 unit-price guide draws the same distinction between the shelf price a shopper sees and the cost-per-unit figure a seller needs to price profitably.

Quantity must be the net contents declared on the label, in the unit you're measuring against. A 24-pack of 12-fluid-ounce cans is not 24 units of anything useful for comparison against a 2-liter bottle; it's 288 fluid ounces, or 1.7 gallons, and only then does the comparison work. Convert first, divide second.

The output unit follows whatever you divided by. Dollars divided by ounces gives dollars per ounce. Dollars divided by count gives dollars per item. Pick one convention and hold it across every package in the comparison, which is the only rule that makes the arithmetic trustworthy.

Worked Example: One Calculation, Three Valid Outputs

Take a 32-fluid-ounce carton of juice at $4.00 against a 64-fluid-ounce carton at $6.40 — the comparison Shopify's guide uses in its 2026 explainer. Divide $4.00 by 32 and you get $0.125 per fluid ounce. Divide $6.40 by 64 and you get $0.10 per fluid ounce. The larger carton wins by $0.025 per ounce.

Express the same result three ways and the decision doesn't change. Per ounce, it's 12.5¢ versus 10¢. Per 100 ounces, it's $12.50 versus $10.00. Per gallon (128 fluid ounces), it's $16.00 versus $12.80. The largest carton is 20% cheaper per fluid ounce, which is the same as saying you'd pay $3.20 more per gallon for the small one.

Cross-check by scaling the total. Four small cartons cost $16.00 and deliver 128 ounces. Two large cartons cost $12.80 and deliver 128 ounces. Same volume, $3.20 difference — the per-unit math and the whole-basket math agree, which is the test that catches conversion errors.

Watch for the rounding trap. If you report $0.13 per ounce for the small carton instead of $0.125, the gap looks like 3¢ when it's really 2.5¢. Carry the full decimal through the comparison and round only at the end, or multiply up to a whole number of units (per 100 ounces, per dozen) before you judge.

Conversion Tables for Ounces, Pounds, Liters, and Count

Most comparison failures happen before the division. Two packages of the same product in different unit systems — one in fluid ounces, one in milliliters — need a common base before either number means anything.

From To Multiply by Worked example
Fluid ounces Milliliters 29.5735 32 fl oz = 946.4 mL
Milliliters Fluid ounces 0.033814 750 mL = 25.36 fl oz
Ounces (weight) Grams 28.3495 16 oz = 453.6 g
Pounds Kilograms 0.453592 2 lb = 0.907 kg
Liters Fluid ounces 33.814 2 L = 67.63 fl oz
Grams Ounces 0.035274 500 g = 17.64 oz

Convert both packages to the same side of the table, then divide. A 750-milliliter bottle at $9.99 becomes $0.01332 per milliliter, or $13.32 per liter. A 2-liter bottle at $24.99 becomes $12.495 per liter. The 2-liter wins by 83¢ per liter — a result you can't see from the shelf tags because they're printed in different units.

Weight ounces and fluid ounces are not interchangeable, and mixing them is the single most common unit-price error. A 16-ounce jar of peanut butter is sold by weight; a 16-fluid-ounce bottle of syrup is sold by volume. Comparing their unit prices directly tells you nothing unless the products are the same density, which food rarely is. Convert both to price per 100 grams only if the product is sold by weight on both labels.

The Four Cases Where the Unit Price Strains

The formula is exact. The answer can still mislead you, and knowing when matters more than knowing how to divide.

First, quality and concentration. A $0.10-per-ounce laundry detergent at double concentration does twice the loads per ounce of a $0.06-per-ounce regular formula, which inverts the apparent winner. Divide by loads per container instead of fluid ounces when the product is diluted or concentrated, and you get $1.25 versus $0.90 per load — the opposite ranking.

Second, drained weight. Canned goods are typically priced on net weight including brine or syrup. Two cans of the same vegetable at the same net weight can hold different amounts of food. If the label declares drained weight, use it; if it doesn't, the comparison is approximate and you should say so.

Third, nonlinear pricing. Buy-two-get-one-free deals, membership pricing, and bulk bins break the single-division model because the effective total cost isn't the sticker price. Recompute total cost after the discount, then divide — a $9.99 item in a 3-for-$25 promotion has a real unit cost of $8.33, not $9.99.

Fourth, freshness and storage. Five pounds of potatoes at a lower unit price can be the worse buy if a third of it sprouts before you cook it. The per-unit figure doesn't see spoilage, so for perishables, convert to price per meal or per use rather than price per pound.

Step-by-Step: Calculating Unit Price in a Store Aisle

Here's the sequence to run when you're standing in front of two packages and don't want to guess.

1: Read the net quantity on each label and write both down, including the unit — "64 fl oz" and "1.89 L," not just the number. 2: Convert both quantities to the same unit using the conversion table above, or ask a phone assistant for the conversion and verify it against the label. 3: Divide each total price by its converted quantity, carrying at least four decimal places. 4: Multiply both results by the same round number (100, 1,000, or a dozen) so you can compare whole figures instead of tiny decimals. 5: Check the shelf tag for a printed unit price and compare it to your answer — a mismatch means either the tag is stale or you divided by the wrong quantity. 6: Recompute with any promotion applied to total cost before you commit.

If the shelf tag is missing or disagrees with your calculation, trust your own math and flag the discrepancy to the store. Per NIST's retail pricing guidance, unit-price display rules differ by state, so a missing tag in a voluntary state is normal rather than a mistake. If the quantity is declared only in a unit you can't convert confidently — say, a count of "servings" with no gram weight — skip the unit-price comparison and buy on total cost per package instead.

Fifteen-Second Mental Math for the Aisle

You won't do long division in your head under fluorescent light, so use anchors instead. Ten cents per ounce equals $1.60 per pound. That single conversion handles most grocery comparisons in the US, because weight-priced goods cluster around the pound and volume-priced goods around the ounce.

For the common case of two packages in the same product line, divide the larger total by the smaller total and compare it to the ratio of the quantities. A $6.40 large against a $4.00 small is a price ratio of 1.6; the quantity ratio is 64 ÷ 32 = 2.0. Because the price ratio (1.6) is smaller than the quantity ratio (2.0), the large package is the better unit price. If the price ratio exceeds the quantity ratio, the small one wins.

Bulk-bin arithmetic compresses further. At $4.99 per pound, a handful that weighs 0.4 pounds costs about $2.00. At $0.31 per ounce, an 8-ounce bag costs $2.48. The bulk bin wins by 48¢ as long as you'll use the whole handful — and loses if half of it goes stale, which is the same spoilage rule from the section above applied at small scale.

Round aggressively for the mental check, then verify the winner exactly on the two finalists only. Checking every package in the aisle at full precision wastes more time than it saves.

What the Shelf Tag Doesn't Guarantee

US unit-pricing law is a patchwork.svg no. Let me write it clean.

US unit-pricing law is a patchwork. NIST's guide to retail pricing laws, which the Shopify explainer cites, identifies mandatory unit-price provisions in states including Connecticut and New York, with voluntary provisions elsewhere. That means a tag you rely on in one state may simply not exist two states over, and where it does exist, the base unit chosen by the retailer may not match the base unit you want.

Retailers often pick a base that flatters the product. Coffee may be priced per ounce on one shelf and per pound on the next. Cereal may use per-ounce where the box is light and per-100-grams in a store that runs metric tags. The base is disclosed, but it's chosen by the seller, so a tag reading "$0.42 per oz" is correct and still useless for comparing against a tag reading "$6.71 per lb" — until you convert the second one, which lands at $0.42 per ounce. Identical. The tags looked different and the prices were the same.

Shrinkflation makes this worse. CivicScience research published in April 2025 found that 56% of Americans surveyed had noticed grocery packaging getting smaller without a matching price drop. A unit-price tag updated with the new net weight will show the increase; a stale tag, or a shopper comparing against a remembered price, will not. Recompute from the label whenever the package looks different from last month.

Comparing Business Unit Cost to Selling Unit Price

If you're pricing a product rather than buying one, the same division runs in the opposite direction, and confusing the two directions is where small sellers lose money.

Unit cost is total production spend divided by units made. Stocksmith's 2026 explainer works the example: $150 spent on materials, labor, and packaging across 30 candles gives a unit cost of $5.00 per candle. That $5.00 is the floor. Any selling unit price below it produces a loss on every sale, no matter how the total revenue looks.

Selling unit price is total revenue divided by units sold. If those 30 candles bring in $450, the selling unit price is $15.00 and the gross margin per unit is $10.00. If only 24 sell and 6 go unsold, revenue stays at $360 but the effective unit cost rises to $6.25, because the $150 was spent making 30. Unsold inventory is a cost-per-unit problem disguised as a revenue problem.

The formula flips cleanly: selling unit price = unit cost ÷ (1 − target margin as a decimal). For a $5.00 cost and a 40% target margin, that's $5.00 ÷ 0.60 = $8.33. Shopify's seller-side guidance points at the same relationship between the displayed unit price and the underlying cost per unit. Keep the two figures on separate lines in your spreadsheet so a margin calculation never gets fed a retail price by mistake.

Arithmetic Traps: Rounding, Tax, and Mixed Units

Three errors account for most wrong answers, and each has a simple guard.

Rounding too early is the most common. Report to four decimals during the comparison and round to two only for display. If you round $0.125 to $0.13 and $0.10 stays at $0.10, the gap reads as 3¢ against a true 2.5¢ — small in absolute terms, but it can flip a close call. Carry the full figure.

Excluding tax from total cost understates every unit price, and it does so unevenly when products are taxed differently. In most US states, food is exempt or reduced while prepared food and non-food items are fully taxed, so a packaged snack and a prepared meal with identical shelf prices have different real unit costs. Add tax to total cost before dividing, and compute the tax yourself from the published rate in your jurisdiction rather than assuming it's included.

Mixing count units with measurement units produces answers that look numeric and mean nothing. $12 for 48 batteries is $0.25 per battery; $12 for 48 ounces of something is $0.25 per ounce. Same number, incompatible conclusions. Label the output unit every time you write down a result — the label is the proof that the division was legitimate.

Quick Reference: Formula, Failure Cases, and Sources to Check

Keep the arithmetic in one place and the judgment calls in another.

Situation Formula or action What to watch
Same unit, different sizes Total ÷ quantity for each, compare Carry four decimals
Different units Convert to common base first Weight vs. fluid ounces
Concentrated product Total ÷ loads per container Concentration inverts rankings
Canned goods Use drained weight if declared Net weight includes brine
Promotional pricing Apply discount to total, then divide Effective vs. sticker price
Bulk bins Price per lb × measured weight Spoilage for perishables
Business pricing Selling price = cost ÷ (1 − margin) Unsold units raise real cost

Verify mandatory unit-price display rules with your state's weights and measures office, and cross-check published retail pricing guidance against the NIST retail pricing laws guide. For seller-side calculations, confirm the current version of your platform's unit-price documentation — Shopify's help center documents the base-measure method for merchants in 2026 — since the display formula can change between platform versions.

FAQ

Is unit price the same as price per item?

Only when the item is sold individually. A pack of 12 pens for $6.00 has an item unit price of $0.50 per pen, but a 12-ounce bottle of shampoo for $6.00 has a unit price of $0.50 per ounce — a different measurement entirely. Decide whether your comparison is per count or per measure, then apply the same convention to every package in the set. Mixing the two produces results that look valid and aren't.

Why does the shelf tag show a different unit price than my calculation?

Either the tag is stale after a package-size change, or it's using a different base unit than yours. Retailers choose the base — per ounce, per 100 grams, per pound — and disclose it on the tag, but the choice varies by product category and by store. Recompute in the tag's base unit to check it, then convert to your preferred base for the comparison. A persistent mismatch is worth reporting to the store.

How do I compare a 12-pack of 12-ounce cans against a 2-liter bottle?

Convert both to the same unit, then divide. The cans hold 144 fluid ounces total; the bottle holds 67.63 fluid ounces. At $8.99 for the cans, the unit price is $0.0624 per ounce. At $2.49 for the bottle, it's $0.0368 per ounce. The bottle wins by $0.0256 per ounce, or about $3.28 per gallon — a gap large enough that most buyers would see it even with rough mental math, which is why the conversion step is worth doing carefully.

Does a lower unit price always mean the better buy?

No, and three cases break the rule: concentrated products that deliver more uses per ounce, perishables where spoilage eats the savings, and quality differences that aren't priced in. The unit price answers "which package delivers the cheaper measure," not "which purchase serves me better." Use it as the first filter, then override it with the per-use or per-meal calculation when the product isn't consumed at a steady rate.

How do I compute a selling price from unit cost?

Divide unit cost by one minus your target margin. A $5.00 unit cost with a 40% target margin gives $5.00 ÷ 0.60 = $8.33. If you compute margin as a percentage of the selling price rather than cost, the same formula holds; if you compute it as a markup on cost, multiply instead — $5.00 × 1.40 = $7.00. Know which convention your spreadsheet uses, because the two answers differ by $1.33 on the same input.

What happens to unit price when a package gets smaller?

It rises, even if the shelf price doesn't change. A 16-ounce box at $3.99 is $0.2494 per ounce; shrink it to 14 ounces at the same price and the unit price becomes $0.2850 per ounce, a 14.3% increase. That's the shrinkflation pattern CivicScience's April 2025 survey found 56% of Americans had noticed. Recompute from the net weight on the label rather than trusting a remembered price.

Can I use unit price to compare products that aren't identical?

Only when the products are genuinely substitutes at the same concentration and quality tier. Store-brand and name-brand flour at the same protein content compare cleanly; two laundry detergents at different concentrations don't. Convert to price per use — loads, servings, or applications — before comparing across formulations, and state the assumption you used so the comparison can be checked.