Skip to content
CalculatorZilo Logo
  • Home
  • CalculatorsExpand
    • Browse all calculators
    • Education
    • Real Estate
    • Chemistry
  • Finance
  • Math
  • Health & Fitness
  • Science
  • About
  • Contact
CalculatorZilo Logo
Home / Cost Per Gallon Calculator
General Calculators

Cost Per Gallon Calculator

Published onJuly 7, 2025 Updated onOctober 21, 2026 12:11 am

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.

Cost Per Gallon Calculator
Total cost divided by total gallons, for fuel, paint, beverages, oils, and bulk liquids

Cost per gallon
—

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

Quick answer: A $45 purchase of 15 gallons costs $3.00 per gallon: total cost divided by total gallons. The same division prices any liquid, so $60 of paint over 20 gallons is also $3.00 per gallon, directly comparable with the fuel figure even though the products and package sizes differ completely.

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.
On this page
  • 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 formulas: Cost per gallon = total cost / total gallons. Reverse: total cost = cost per gallon x total gallons. Unit facts: 1 US gallon = 128 US fluid ounces = 3.785 liters; 1 imperial (UK) gallon = 1.201 US gallons = 4.546 liters.

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.

LiquidTotal costGallonsCost per gallon
Fuel (pre-filled example)$45.0015$3.00
Paint, 20-gallon contractor pack$60.0020$3.00
Paint, single gallon tin$42.001$42.00
Milk, grocery gallon$4.701$4.70
Homebrew batch cost spread over output$176.005$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.

$3.00
Cost per gallon in the worked example
128 oz
Fluid ounces in one US gallon
3.785 L
Liters in one US gallon
1.201x
Imperial gallon size vs US gallon

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

Embed the Cost Per Gallon Calculator on your own site. Pick a size to preview it live, then copy the code.

Powered by Calculator Zilo

References

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Related calculators

General CalculatorsConjugation CalculatorType a verb, pick a language and a tense, and get the full six-person conjugation table.General Calculators Ww Point Calculator Enter the calories, protein, total fat and total carbohydrates from a food label and this calculator returns a single points estimate you can add to a daily tally.General CalculatorsGuitar Chord CalculatorPick a root note and a chord type and this calculator spells the chord for you: its name, the exact notes in...General CalculatorsTv Size CalculatorA 55 inch television is not 55 inches wide.General CalculatorsCheck Writing CalculatorTurn any dollar amount into the exact words your bank expects on a check: instant, free, and formatted the way tellers are trained to read it.General CalculatorsPeak Value CalculatorGive this calculator a starting amount, a growth rate and a time horizon, and it projects the peak value of the investment: the largest it can reach under steady compound growth.

We use cookies to analyze traffic. You can accept or decline cookies below. Learn more

calculatorzilo

CalculatorZilo

Free calculators for everyday life. No signup, no cost, just answers.

Categories

Finance Math Health & Fitness Education Science Real Estate Chemistry Browse all calculators

Popular tools

Mortgage Payment Calculator BMI Walking Calculator Salary Per Minute Calculator Percentage Off Calculator

Company

About Us Contact Us Privacy Policy Terms and Conditions
Disclaimer Cookie Policy DMCA Policy Affiliate Disclosure FAQ Accessibility Statement

© 2026 CalculatorZilo • Free calculators for everyone

  • Home
  • Calculators
    • Browse all calculators
    • Education
    • Real Estate
    • Chemistry
  • Finance
  • Math
  • Health & Fitness
  • Science
  • About
  • Contact
Search