Price Per Gram Calculator
Use this calculator to find unit price (cost per gram) and compare products with different package sizes.
Knowing how to calculate price per gram helps you make smarter buying decisions in seconds. Whether you are shopping for coffee beans, protein powder, spices, supplements, chocolate, or bulk foods, comparing by package price alone can be misleading. Unit pricing gives you a fair apples-to-apples comparison.
Price per gram formula
The formula is simple:
Price per gram = Total price ÷ Total grams
If the package is not already listed in grams, convert it first. Then divide the price by the number of grams.
Quick example
If a 340 g bag of coffee costs $11.90:
- Total price = 11.90
- Total grams = 340
- Price per gram = 11.90 ÷ 340 = 0.035
So the coffee costs $0.035 per gram (or 3.5 cents per gram).
Step-by-step: how to calculate price per gram
1) Find the total price
Use the full price you will actually pay. If there is a coupon or sale, use the discounted amount.
2) Find the package weight
Look at the label for grams (g), kilograms (kg), ounces (oz), pounds (lb), or milligrams (mg).
3) Convert weight to grams (if needed)
| Unit | Convert to grams |
|---|---|
| 1 kilogram (kg) | 1,000 g |
| 1 milligram (mg) | 0.001 g |
| 1 ounce (oz) | 28.3495 g |
| 1 pound (lb) | 453.592 g |
4) Divide price by grams
This gives the unit price per gram. Lower is usually better when quality is equal.
Comparing two products using unit price
Let’s compare two snack packs:
- Pack A: $4.50 for 150 g → $0.030 per gram
- Pack B: $6.00 for 250 g → $0.024 per gram
Even though Pack B costs more upfront, it is cheaper per gram. This is exactly why unit pricing matters.
Real-world use cases
Groceries
Use price per gram for nuts, cheese, deli meat, candy, spices, tea, and frozen produce.
Fitness and supplements
Protein powders, creatine, collagen, pre-workout, and powdered greens are often sold in different serving sizes. Price per gram cuts through the marketing.
Coffee and specialty products
Beans are commonly sold in 250 g, 340 g, 500 g, or 1 kg bags. Comparing per gram helps you spot better value quickly.
Common mistakes to avoid
- Not converting units: comparing ounces and grams directly gives wrong results.
- Ignoring discounts: always use actual checkout price.
- Comparing different quality tiers: cheaper per gram is not always better if quality differs a lot.
- Forgetting net weight: use edible or usable weight, not shipping weight.
When price per gram is not enough
Unit price is a powerful first filter, but final value can depend on other factors:
- Ingredient quality and purity
- Brand reliability and lab testing
- Waste, moisture, or spoilage
- Taste, texture, and personal preference
- Convenience and packaging format
Best practice: use price per gram to shortlist options, then choose based on quality and fit.
How to estimate total cost for your planned usage
After finding price per gram, you can estimate cost for any quantity:
Estimated cost = Price per gram × grams you need
Example: if your unit price is $0.028/g and you need 750 g:
0.028 × 750 = $21.00
This is useful for meal prep, recipe planning, and monthly budgeting.
Final takeaway
If you remember one thing, remember this: always compare products using unit price. Calculating price per gram takes less than a minute and can save money every week. Use the calculator above whenever you shop, and you will make clearer, more confident purchase decisions.