Packcompare

Method & assumptions

Make the quantities comparable before comparing the price.

Packcompare divides each entered whole-offer price by its total entered net content. It is useful when two similar products have different pack sizes or when one offer contains several identical containers. The comparison uses exact fractions; rounded display values never determine which rate is lower.

Start with the whole-offer price

Price A is what you intend to pay for all of Offer A, not the price of one contained bottle or bag unless there is only one. Price B follows the same rule. Use one currency for both prices. Enter the intended total yourself, including whatever charges you want represented. The calculator does not fetch prices, interpret a coupon, calculate tax, convert currencies or check whether a special offer is available.

The two original whole-offer prices remain visible in the result. A lower price per kilogram can come in a more expensive whole package. That distinction matters if you need a smaller amount, have limited storage or will not use all the contents.

Containers × amount in each

For one 750 g package, enter 1 identical container and 750 g in each. For a six-bottle offer with 250 mL in every bottle, enter 6 containers and 250 mL in each, plus the total price of the six-bottle offer. The result uses 6 × 250 mL = 1500 mL = 1.5 L.

A container is just a multiplier in this model. It can be a bottle, bag, box or another repeated unit. For count-based products, an offer might contain two boxes of 12 items: enter 2 containers and 12 items in each. A bundle of unlike products is outside this model because a single common quantity may not describe it meaningfully.

One dimension at a time

The mass mode supports g and kg, with output per kg. Volume supports mL and L, with output per L. Count supports whole items, with output per item. The decimal conversion factors are exact: 1000 g = 1 kg and 1000 mL = 1 L. Mass and volume cannot be compared without additional information, which this tool does not infer.

Changing the comparison type resets the available unit choices and clears the current result. It does not convert the numeric amounts you entered. Review both quantities before selecting Compare unit prices again.

The exact arithmetic

For each offer, let P be the entered price, n the number of identical contained units, and q the amount in each after conversion to the common unit. The model is:

total quantity = n × q
unit price = whole-offer price ÷ total quantity

Decimals are parsed into bounded integers. The implementation represents canonical quantities in billionths of a kg, litre or item. It reduces the resulting price ratios with integer arithmetic. To compare two rates, it cross-multiplies the positive denominators. An exact tie is a true equality of the fractions, not a similarity of displayed decimals.

The absolute difference is the magnitude of rate A minus rate B in the same common unit. The tool does not show a percentage-saving calculation. A zero entered price is valid: one free offer has a unit price of zero, and two free offers have an exact unit-price tie as long as both quantities are positive.

Bounds and plain-decimal syntax

Each price is 0 through 1,000,000,000 in your common currency. Each amount in one contained unit is greater than 0 and no more than 1,000,000,000. Those two fields accept up to six fractional places. Use digits before a decimal point and at least one digit after it: write 0.5, not .5. Item mode requires a whole positive item quantity even if you enter a decimal spelling such as 12.000000.

Contained-unit count is a whole positive integer from 1 through 1,000,000. Each raw field may contain at most 32 characters, including optional ASCII outer spaces. Leading zeroes are allowed. Signs, exponents, tabs, comma separators, units, NaN, Infinity and extra text are rejected. Do not type a currency symbol into a price field.

These are software bounds, not claims about realistic package sizes or currency precision. A number just above the maximum is rejected on its exact decimal value. No value is silently clamped into range.

Display and exports

Rates and the absolute difference are shown to up to 12 significant digits. The display policy rounds to the nearest value, with exact halfway cases rounded upward. Very small or large results may use scientific notation. A tiny positive rate is not deliberately rounded into zero. If two displayed rates round alike but their exact fractions differ, the result says so and keeps the exact ranking.

Text and JSON downloads are generated locally. JSON stores exact numerator and denominator strings, original input strings and exact normalized quantities. These are not rounded currency invoices. Every edit clears all old output and disables exports until a new comparison completes. Reset example explicitly restores the starting values, including the comparison type.

Choose quantities that mean the same thing

The result assumes similar usable contents. Concentration, quality, yield, drained weight, spoilage, packaging convenience and what you actually need can change the usefulness of a lower unit price. Choose an appropriate quantity basis yourself; this calculator makes no adjustment for those differences.

Primary context and unit references

Packcompare’s per-kg, per-litre and per-item choices are a calculator design choice. This is not an official service, an endorsement, or a retailer-label compliance tool. Read the worked examples to see the arithmetic in context.