Cost Per Gallon Calculator
Shelf prices and pump totals hide the only figure that lets you compare two liquids fairly: what one gallon costs. A bigger container at a higher total price is often the cheaper buy, and a fill-up that felt expensive may simply have been more gallons. Cost per gallon strips the package size out of the comparison.
Enter the total cost and the total gallons, for fuel, paint, milk, oil, cleaning chemicals, or any other liquid, and this calculator returns the cost per gallon to the cent, so offers, container sizes, and suppliers can be compared on one honest basis.
Figures are in US gallons: 1 US gallon = 128 fluid ounces = about 3.785 liters. An imperial (UK) gallon is larger, about 1.201 US gallons, so convert before comparing a UK price.
Quick Answer
Key takeaways
- Cost per gallon is a unit price: it removes container size from the comparison so a 1-gallon jug and a 5-gallon drum can be judged fairly.
- Include tax and delivery in the total when you want the delivered cost per gallon, which is the figure that matters for bulk buying decisions.
- The tool works in US gallons: 128 fluid ounces, about 3.785 liters. Imperial gallons are about 20 percent larger.
- Reverse the formula to budget: cost per gallon times gallons needed equals the total to plan for.
- Quick Answer
- How to use the cost per gallon calculator
- The cost per gallon formula, units, and the reverse calculation
- Worked example: $45 for 15 gallons, and three comparisons
- When cost per gallon decides, and when it misleads
- What competing calculators miss
- Frequently Asked Questions
- Add This Calculator to Your Website
- References
How to use the cost per gallon calculator
Enter the total cost first: the full amount paid for the liquid, or the amount you expect to pay. Then enter the total volume in US gallons, using decimals where the quantity is not whole: two and a half gallons is 2.5. Press Calculate and the cost per gallon appears, rounded to the cent.
Two judgment calls decide whether the result is useful. The first is what belongs in the total. For a quick pump-price check, the amount on the receipt is enough. For a bulk buying decision, add delivery, tax, and any container deposit, because the delivered cost per gallon is what you are really choosing between suppliers. The second is the volume basis: use the volume you actually received, not the nominal container size, when a drum or tank is filled short.
The main uses repeat across home and business: checking a fuel price against another station or against last month, comparing paint or coating prices across brands and tin sizes, pricing milk, cooking oil, or cleaning chemicals bought in bulk, and setting a selling price per gallon for anything resold by volume. Drivers pairing this with distance can price the driving itself with the cost per 100 miles calculator.
The cost per gallon formula, units, and the reverse calculation
One division, and it runs in both directions.
The gallon itself is a defined unit, not a rough measure: the US liquid gallon is exactly 231 cubic inches under the NIST weights and measures standards, which is why pump and label volumes can be audited against it. The imperial gallon used historically in the UK is a different, larger unit, and mixing the two is the most common silent error in per-gallon comparisons copied from international listings. If a price is quoted per liter, divide by 3.785 to restate your US cost per gallon as a cost per liter, or multiply a per-liter price by 3.785 to compare it here.
The reverse formula is the budgeting form. Once you know a fair cost per gallon, multiplying by the gallons a job, a month of driving, or a production run will consume gives the total to budget or quote. The US Energy Information Administration publishes the retail gasoline and diesel price series most drivers benchmark against, and its price breakdowns show how much of a pump gallon is crude oil, refining, distribution, and taxes, which explains why two regions can post honestly different per-gallon prices on the same day.
Worked example: $45 for 15 gallons, and three comparisons
The calculator is pre-filled with a $45 total over 15 gallons, which returns $3.00 per gallon. The table below runs the same division across the liquids people most often compare, so the pattern is visible at a glance.
| Liquid | Total cost | Gallons | Cost per gallon |
|---|---|---|---|
| Fuel (pre-filled example) | $45.00 | 15 | $3.00 |
| Paint, 20-gallon contractor pack | $60.00 | 20 | $3.00 |
| Paint, single gallon tin | $42.00 | 1 | $42.00 |
| Milk, grocery gallon | $4.70 | 1 | $4.70 |
| Homebrew batch cost spread over output | $176.00 | 5 | $35.20 |
The paint rows carry the lesson. The contractor pack and the fuel happen to share a $3.00 figure, while the single tin of the same class of paint costs $42.00 per gallon: package size, not product, creates most of that gap. This is also why per-gallon thinking matters beyond liquids bought by the gallon. The homebrew row comes from costing a full batch and spreading it over the 5 gallons produced, the same approach the beer cost calculator automates per bottle and per serving, and the coffee equivalent, cost per cup, is handled by the coffee cost per cup calculator.
When cost per gallon decides, and when it misleads
Unit pricing is the fairest comparison available for identical liquids, and a genuinely weaker one the moment the liquids differ in concentration, quality, or coverage. Knowing which situation you are in is the skill.
Trust the per-gallon figure when
- Comparing the same product in different container sizes
- Comparing fuel prices across stations or over time
- Quoting bulk supply where delivery is included in the total
- Budgeting consumption: price per gallon times gallons used
Look deeper when
- Paints differ in coverage or coats needed per gallon
- Chemicals differ in concentration or dilution ratio
- A cheaper gallon carries delivery, deposit, or minimum-order fees left out of the total
- The volume is imperial gallons or liters, not US gallons
A concentrated cleaner at $20 per gallon diluted 1 to 10 works out cheaper per usable gallon than a ready-to-use product at $5 per gallon; the honest comparison restates both at working strength first. Paint is similar: cost per gallon divided by realistic coverage per gallon gives cost per covered area, the figure a contractor actually bids on. Households tracking a whole utility bill rather than one liquid can roll the same habit up with the utilities cost per month calculator.
What competing calculators miss
The tools ranking for this keyword are almost all the same two-box divider, and several bury it in pages aimed only at drivers, as if fuel were the only liquid sold by volume. The division is correct everywhere; the context around it is where pages fail.
Miss 1: fuel-only framing. Paint, milk, oils, cleaning chemicals, and bulk ingredients are bought by the gallon just as fuel is, and the comparison logic, including tax and delivery in the total, is spelled out here for all of them.
Miss 2: no unit discipline. Few competing pages state which gallon they mean. This page fixes the basis in US gallons, gives the ounce and liter equivalents, and quantifies the imperial difference at 1.201 times, the conversion error most likely to corrupt a comparison.
Miss 3: no reverse or judgment guidance. A unit price alone does not finish a decision. The reverse formula for budgeting, and the cases where concentration or coverage beats a lower per-gallon sticker, are covered above because they change real purchases.
One honest limit: this calculator prices volume, not value. It cannot tell you whether the liquid is any good, how far it goes, or whether you need it at all, and for diluted or coverage-based products those questions matter more than the sticker division.
Frequently Asked Questions
Divide the total cost by the total number of gallons. For example, $45 divided by 15 gallons equals $3.00 per gallon. The same formula prices fuel, paint, milk, oils, and any other liquid sold or used by volume.
One US gallon equals 128 US fluid ounces and about 3.785 liters. It is defined as 231 cubic inches. The imperial gallon used in the UK is larger, about 4.546 liters or 1.201 US gallons, so convert before comparing prices across the two systems.
Yes. Both fields accept decimals, so 2.5 gallons or a total of $18.75 calculate exactly. The result is rounded to two decimal places, which suits currency.
Include them when you want the true delivered cost per gallon, which is the right basis for bulk buying and supplier comparisons. Leave them out when you only want to check a shelf or pump unit price against another shelf or pump price.
Reverse the formula: multiply the cost per gallon by the number of gallons. At $3.00 per gallon, 40 gallons cost $120. This is the budgeting form of the calculation, used for fuel budgets, paint estimates, and bulk orders.
Packaging, handling, and shelf costs are spread over more gallons, and contractor or bulk packs are priced for repeat buyers. In the worked example the contractor pack works out to $3.00 per gallon against $42.00 for a single gallon tin, which is why unit price, not sticker price, is the fair comparison.
Yes. Farms, cleaning businesses, and facilities teams use cost per gallon for water, solvents, detergents, and agricultural chemicals. For concentrates, first restate the cost at working dilution, since a gallon of concentrate may make many gallons of usable solution.
Add This Calculator to Your Website
References
- National Institute of Standards and Technology, "NIST Handbook 44", the US weights and measures specifications that define the gallon as 231 cubic inches. NIST: Handbook 44, Specifications and Tolerances. Accessed October 2026.
- US Energy Information Administration, "Gasoline and Diesel Fuel Update", the official retail fuel price series and per-gallon price breakdowns. EIA: Gasoline and Diesel Fuel Update. Accessed October 2026.
- US Energy Information Administration, "Gasoline Prices and Outlook" explainer, on what drives the price of a gallon of gasoline. EIA: Gasoline Prices and Outlook. Accessed October 2026.
- US Environmental Protection Agency and Department of Energy, "FuelEconomy.gov", official fuel economy data for turning per-gallon prices into per-mile costs. FuelEconomy.gov: Fuel Economy Ratings. Accessed October 2026.
- US Energy Information Administration, "Energy Units and Calculators Explained", the official guide to gallon-based fuel units and the per-gallon conversion factors used to compare fuel costs. EIA: Energy Units and Calculators Explained. Accessed October 2026.
