Unit Price Calculator

Free unit price calculator. Find the true cost per unit (per gram, per litre, per item) so you can compare products of different sizes and spot the best value.

AI-ready Use this tool with AI

This tool has a free JSON API. Copy a prompt or skill below to use it with ChatGPT, Claude, or any AI agent โ€” no API key needed.

API docs
โ€”
Enter price and quantity above.

How unit price calculator works

Shoppers compare products by computing the price per unit โ€” for example, the cost per gram or per millilitre โ€” because larger packs are not always cheaper. Dividing the total price by the quantity gives a single comparable number for each option, so the lowest one is the best value.

This calculator divides the price by the quantity and reports the price per unit, optionally labelled with a unit of your choice (grams, millilitres, count, and so on). You can run it for several products and compare the per-unit prices to find the cheapest.

Enter the total price, the quantity, and an optional unit label. The tool returns the price per unit. Use it in the grocery aisle to compare differently sized packages, or online to compare bulk versus single items.

Frequently asked questions

How do I compute the unit price?
Divide the total price by the quantity. For $4.99 over 500 g, the unit price is $0.00998 per gram, or about $9.98 per kilogram โ€” this calculator reports it directly.
Why use a unit price?
Because product sizes vary, the sticker price does not tell you which is cheaper. The unit price gives a single comparable number so you can see the true value regardless of pack size.
What units can I use?
Any unit label you like โ€” grams, millilitres, ounces, count. The label is for display; the calculation is simply price divided by quantity, so keep the unit consistent across the products you compare.
Is the biggest pack always cheapest per unit?
Usually but not always. Sometimes a smaller pack is on sale and beats the bulk price per unit โ€” which is exactly why computing the unit price is worth the few seconds it takes.