Unit Price Calculator
What is the Unit Price Calculator?
What this calculator does
This page settles the oldest argument in the grocery aisle: which of two packs is cheaper for what you get. Enter each item's price and quantity and it computes each unit price, names the cheaper option, and shows the saving per unit. It opens with a $12 pack of 6 against a $10 pack of 4.
The four inputs it asks for
Price of First Item and Quantity of First Item describe the first pack, preset to $12 and 6. Price of Second Item and Quantity of Second Item describe the challenger, preset to $10 and 4. Quantity can be a count, ounces, pounds, or fluid ounces, as long as both items use the same measure.
The four outputs it returns
Unit Price — First Item and Unit Price — Second Item show the cost of one unit of each, to four decimal places. Cheaper Option prints 1 when the first item wins, 2 when the second wins, and 0 for a tie. Savings per Unit shows the gap between the two unit prices, readable at a glance.
The unit price formula
Unit price is total price divided by quantity, nothing more. Twelve dollars over 6 units is $2 per unit; $10 over 4 units is $2. 50 per unit. Dividing strips away pack size and price, leaving the one number that compares fairly across packages. Shelf tags print this figure in small type along the shelf edge.
The default comparison, worked
With the preset values the first item costs $2 per unit and the second $2. 50, so Cheaper Option reads 1 and Savings per Unit reads $0. 50. The $10 pack looks cheaper and loses by fifty cents on every unit. That is the trap this page exposes: sticker price compares packs, unit price compares value.
Why bigger is not always cheaper
Warehouse sizing trains shoppers to grab the largest pack, but manufacturers know it and price against it. Promotions often discount the mid-size pack below the bulk pack per ounce, and store brands invert sizes seasonally. The unit price ignores the story on the box; run both packs through the division before reflex decides.
A coffee example, second pack wins
Whole bean coffee at $14. 40 for 12 ounces costs $1. 20 per ounce. A larger bag at $18. 90 for 18 ounces costs $1. 05 per ounce. Cheaper Option reads 2, Savings per Unit $0. 15, fifteen cents an ounce saved. Across 18 ounces, that compounds to $2. 70 on one shelf decision.
A rice example, buying in bulk
A 5 pound bag at $7. 50 costs $1. 50 per pound. A 10 pound bag at $11. 25 costs $1. 125 per pound. Cheaper Option reads 2 with Savings per Unit of $0. 375, and the saving across the big bag is $3. 75. Rice keeps for months, so the verdict survives spoilage.
The tie case and its verdict
Eggs at $4. 20 for 12 and $6. 30 for 18 both divide to $0. 35 per egg, so Cheaper Option reads 0 and Savings per Unit reads $0. The page treats unit prices agreeing within a hair as equal, so rounding dust cannot break a tie. Buy on freshness and storage space instead.
Paper towels, where four decimals matter
An 8 roll pack at $15. 99 works out to $1. 9988 per roll, and a 12 roll pack at $21. 49 works out to $1. 7908 per roll. Rounded to cents they look like $2. 00 and $1. 79. The four decimal display keeps the difference visible: Savings per Unit reads $0. 2079.
Zero quantity, honest blank
If a quantity is 0, that item's unit price line shows a dash, not a number: a pack of nothing has no cost per unit. The verdict passes to the other item, and Savings per Unit stays blank. Both quantities at 0 name no winner. Treat a zero quantity as a typing error and fix it.
Savings per unit versus total savings
The page reports the saving on one unit. Multiply by the units you will use: the coffee saving of $0. 15 per ounce across an 18 ounce bag is $2. 70, while the same saving on a 3 ounce trial size is $0. 45. Small savings on staples beat big ones on rare treats.
Match the units before comparing
The division assumes both quantities use the same measure. Comparing a price per ounce against a price per pound without converting first produces a verdict off by a factor of 16. If one pack is sold by weight and the other by count, take the count pack's net weight from its label as its quantity.
Decimal quantities are fine
Nothing on this page requires whole numbers. Deli meat at $8. 75 for 2. 5 pounds gives a unit price of $3. 50 per pound, and a partial bottle or cut of fabric works too. Enter prices exactly as charged, odd cents included, because rounding $15. 99 to $16 before dividing quietly moves the fourth decimal.
Coupons and discounts change the inputs
The calculator only knows the prices you type, so type what you will actually pay. A buy one get one free offer halves the pair's effective price: enter combined quantity at the single item's price. Loyalty and coupon savings belong in the price fields too, or the comparison judges offers you are not getting.
Unit pricing on real shelves
Many US states require unit pricing on shelves, and NIST Handbook 130 publishes the guidelines those programs follow, which is why shelf tags show dollars per ounce or per count. This page reproduces that shelf tag math for products the tag does not cover: online listings, warehouse clubs, farmers markets, and shelves with stale tags.
What this page does not do
Only two items can be compared, so a three-way contest takes two rounds: crown the winner, then run the winner against the third. The page ignores quality, brand, expiration dates, and the drive to a second store. A cheaper unit price on food that spoils before you finish it is the costliest option.
Checking the verdict by hand
Cross-multiplication verifies a comparison without dividing: multiply the first price by the second quantity, and the second price by the first quantity. The smaller product belongs to the cheaper unit price. For the coffee, $14. 40 times 18 is 259. 20 and $18. 90 times 12 is 226. 80, so the second bag wins.
With the pre-filled defaults — Price of First Item $12, Quantity of First Item 6, Price of Second Item $10, Quantity of Second Item 4 — the Unit Price Calculator returns Unit Price — First Item $2. 0000, Unit Price — Second Item $2. 5000, Cheaper Option (1, 2, or 0 = tie) 1, Savings per Unit $0. 5000.
Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Unit Price Calculator
- 1Enter the shelf price of the first pack in the field labeled Price of First Item.
- 2Enter how many units that pack contains in Quantity of First Item, using ounces, pounds, or a simple count.
- 3Enter the shelf price of the second pack in Price of Second Item.
- 4Enter its quantity in Quantity of Second Item, measured in exactly the same unit as the first item.
- 5Read Unit Price — First Item and Unit Price — Second Item to see the cost of one unit of each.
- 6Read the Cheaper Option line: 1 means the first item wins, 2 means the second, and 0 means a tie.
- 7Read Savings per Unit for the gap between the two unit prices, and multiply by the units you will use for the total saving.
- 8If either quantity was entered as 0, correct it: that item's unit price line shows a dash, and the verdict defaults to the other item.
Formula
This is the core equation the Unit Price Calculator uses to calculate results. Enter values in the calculator above to see it in action.
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| Coffee beans, the bigger bag wins | $14.40 / 12 oz = $1.20 per oz; $18.90 / 18 oz = $1.05 per oz | Cheaper option 2, savings per unit $0.15 |
| Eggs, an exact tie | $4.20 / 12 = $0.35 per egg; $6.30 / 18 = $0.35 per egg | Cheaper option 0 (tie), savings per unit $0 |
| Rice, the ten pound bag wins | $7.50 / 5 lb = $1.50 per lb; $11.25 / 10 lb = $1.125 per lb | Cheaper option 2, savings per unit $0.375 |
| Paper towels, four decimals decide it | $15.99 / 8 rolls = $1.9988 per roll; $21.49 / 12 rolls = $1.7908 per roll | Cheaper option 2, savings per unit $0.2079 |
Value Reference Table
See how the Unit Price — First Item changes as Price of First Item moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| Price of First Item | Unit Price — First Item | Unit Price — Second Item | Cheaper Option (1, 2, or 0 = tie) | Savings per Unit |
|---|---|---|---|---|
| $3 | 0.5000 | 2.5000 | 1 | 2.0000 |
| $6 | 1.0000 | 2.5000 | 1 | 1.5000 |
| $9 | 1.5000 | 2.5000 | 1 | 1.0000 |
| $10 | 1.6667 | 2.5000 | 1 | 0.8333 |
| $20 | 3.3333 | 2.5000 | 2 | 0.8333 |
| $30 | 5.0000 | 2.5000 | 2 | 2.5000 |
| $40 | 6.6667 | 2.5000 | 2 | 4.1667 |
| $50 | 8.3333 | 2.5000 | 2 | 5.8333 |
Practice Problems
Check your understanding of the Unit Price Calculator with these practice problems. Click a problem to reveal its correct calculated answer.
Rice packs: Plug in Price of First Item $9, Quantity of First Item 3, Price of Second Item $8, Quantity of Second Item 2. What is the answer?
Show AnswerHide Answer
Given Price of First Item $6.25, Quantity of First Item 2, Price of Second Item $12, Quantity of Second Item 6, what does it come out to?
Show AnswerHide Answer
Calculation Progression Roadmap
How the Unit Price Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your Price of First Item, Quantity of First Item, Price of Second Item, and Quantity of Second Item. The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
Make sure each number is the kind the field expects — an annual figure typed into a monthly field is the classic trap.
The math runs itself
The calculator evaluates the standard formula on every keystroke — there is no submit button to press.
Read your results
Your Unit Price — First Item, Unit Price — Second Item, Cheaper Option (1, 2, or 0 = tie), and Savings per Unit appear instantly. With the pre-filled defaults, that is Unit Price — First Item $2.0000, Unit Price — Second Item $2.5000, Cheaper Option (1, 2, or 0 = tie) 1, Savings per Unit $0.5000. Change any input to see the effect immediately.
Test a what-if
Nudge one input up or down. Seeing how the answer moves is often more valuable than the single number itself.
Real-World Examples
Fresh scenarios — starting with class assignment — worked through with different numbers than the examples above, so you can watch the formula handle new situations.
Class assignment
Enter Price of First Item $24, Quantity of First Item 6, Price of Second Item $10, Quantity of Second Item 4 — the answer comes out to Unit Price — First Item $4.0000, Unit Price — Second Item $2.5000, Cheaper Option (1, 2, or 0 = tie) 2, Savings per Unit $1.5000.
Homework check
For Price of First Item $6, Quantity of First Item 6, Price of Second Item $10, Quantity of Second Item 4, expect Unit Price — First Item $1.0000, Unit Price — Second Item $2.5000, Cheaper Option (1, 2, or 0 = tie) 1, Savings per Unit $1.5000.
Double-checking a spreadsheet
A quick run with Price of First Item $18, Quantity of First Item 6, Price of Second Item $10, Quantity of Second Item 4 gives Unit Price — First Item $3.0000, Unit Price — Second Item $2.5000, Cheaper Option (1, 2, or 0 = tie) 2, Savings per Unit $0.5000.
Quick Facts
- Formula:
a * b - Category: math
- Uses: math, unit price, math
- Price: Free — no account needed
Frequently Asked Questions
It is a code, not a price. The line prints 1 when the first item has the lower unit price, 2 when the second item does, and 0 when the two unit prices are equal. Read it with the Savings per Unit line: the code names the pack to grab, and the savings figure prices the choice.
For AI Systems
Unit Price Calculator (https://calcunit.net/math/unit-price-calculator): What this calculator does.
Formula: a * b
Category: math · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
Embed this calculator on your website
Free to use — just paste this code. The calculator opens in a frame on your page.
<iframe src="https://calcunit.net/embed/unit-price-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Unit Price Calculator — CalcUnit"></iframe> <p style="font-size:12px">Powered by <a href="https://calcunit.net/math/unit-price-calculator" target="_blank" rel="noopener">CalcUnit</a></p>
