Everyday

Unit Price Calculator — A vs B

Compare package unit prices across ounces, pounds, grams, kilograms, millilitres, litres and counts. See savings for an equal quantity.

Formula and sources updated · Data sources · 2View algorithm, constants and default inputs (JSON)

Enter your values

Lower unit price Option B
Results
Number of A-sized quantities · Primary result · Price basis

About this calculator

Choose each package’s unit separately to compare prices for the same amount. Mass converts between oz, lb, g and kg; volume converts between ml and l. Counts, sheets and washes compare only with their own kind. Use one currency and include any taxes or shipping you want to compare in the entered prices.

Worked example

calculated with the default values below

Option A — price 4.99 · Option A — size 16 · Option A unit / common unit Ounces · Option B — price 8.49 · Option B — size 32 · Option B unit (or same as A) Same as Option A · Number of A-sized quantities 1 · Primary result Lower unit price · Price basis Selected package unit Lower unit price Option B · Option A — price per A unit 0.3119 · Option B — price per A unit 0.2653 · How much cheaper 14.9 % · Saving per unit 0.0466 · Gap per 100 units 4.66 · B quantity for the price of one A package 18.81 · Saving for this quantity 0.75 $ · A — Price per ounce 0.3119 $/oz · A — Price per pound 4.9900 $/lb · A — Price per gram 0.01100 $/g · A — Price per kilogram 11.0011 $/kg

Method and assumptions

Convert each quantity to grams, millilitres or its own count type, then divide price by that amount. Saving percent = (higher unit price − lower unit price) ÷ higher unit price × 100; it is undefined if both prices are zero. Total saving compares equal quantities of the products, using one A package’s size times the selected count; it assumes fractional packages can be bought and does not round purchases to whole B packages. Equivalent B quantity uses B’s own unit and is undefined when B is free. Weight outputs for A use exactly 28.349523125 g per avoirdupois ounce and 453.59237 g per pound. Fluid ounces and mass-to-volume conversions are unsupported. Floating-point rounding differences within four machine epsilons are treated as ties. Choose the selected package unit or the base unit (g, ml, or the same count type) as the price basis; both displayed unit prices use that basis.

Data sources

Disclaimer

These calculators give general estimates. Sizing, pricing, availability and standards vary by brand, retailer and country, so treat the output as a starting point and confirm it against the seller's or authority's own figures.

Maintained by: CalcDelta Formula and sources updated ·

Implementation source

This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.

View algorithm, constants and default inputs (JSON)

Formula and variables

b_A = S_A × k_A; b_B = S_B × k_B; u_A = P_A / b_A; u_B = P_B / b_B; save% = (u_max − u_min) / u_max × 100; saving = (u_max − u_min) × b_A × q

P_A
Price A
P_B
Price B
S_A
Size A
S_B
Size B
u_A
Unit price A
u_B
Unit price B

Convert each quantity to grams, millilitres or its own count type, then divide price by that amount. Saving percent = (higher unit price − lower unit price) ÷ higher unit price × 100; it is undefined if both prices are zero. Total saving compares equal quantities of the products, using one A package’s size times the selected count; it assumes fractional packages can be bought and does not round purchases to whole B packages. Equivalent B quantity uses B’s own unit and is undefined when B is free. Weight outputs for A use exactly 28.349523125 g per avoirdupois ounce and 453.59237 g per pound. Fluid ounces and mass-to-volume conversions are unsupported. Floating-point rounding differences within four machine epsilons are treated as ties. Choose the selected package unit or the base unit (g, ml, or the same count type) as the price basis; both displayed unit prices use that basis.

Embed this calculator

Copy the iframe snippet to place this calculator on your site. No account required. The snippet stays in sync with the inputs currently shown.

Frequently asked questions

Can I compare different package units?

Choose each package’s unit separately to compare prices for the same amount. Mass converts between oz, lb, g and kg; volume converts between ml and l. Counts, sheets and washes compare only with their own kind. Use one currency and include any taxes or shipping you want to compare in the entered prices. Choose the selected package unit or the base unit (g, ml, or the same count type) as the price basis; both displayed unit prices use that basis.

Does the lower unit price always mean the better purchase?

It identifies the lower entered price per unit only. Product quality, waste, shipping, taxes and whether you will use the full quantity are not included. Convert mass to grams, volume to millilitres or count to items. Divide each price by the normalized quantity. Percentage saving divides the unit-price gap by the higher unit price; it is undefined if both are zero. Total saving compares equal product quantities: the gap per base unit times package A’s base quantity times the selected whole-number count. It does not round to whole packages. Weight uses exactly 28.349523125 g/oz and 453.59237 g/lb.