Tools Berry

Gas Cost Calculator

Plan what fuel will cost for a trip. Enter the distance, your vehicle's MPG, and the price of gas to see the total cost, gallons used, and cost per mile. Results update as you type.

Prefilled with a neutral value — edit to your local price.

How to use the gas cost calculator

Type in three numbers and the cost appears instantly — there's no button to press and nothing is sent anywhere.

Trip distance. How far you're driving, in miles. If you're driving there and back, tick Round trip and enter the one-way distance — the calculator doubles it for you.

Fuel efficiency (MPG). Your vehicle's miles per gallon. Use the rating on the window sticker, or your own average from past fill-ups for a more realistic number.

Gas price. The price you pay per gallon. Prices change daily and vary by region, so this is left for you to fill in — edit it to whatever you're paying locally.

Split between people. Carpooling? Tick Split the cost and enter how many people are chipping in to see each person's share.

Everything runs in your browser — the numbers you type are never uploaded.

Common gas cost questions

How do I calculate the gas cost of a trip? Divide the distance by your MPG to get gallons used, then multiply by the price per gallon. For example, 300 miles at 30 MPG is 10 gallons, and at $3.50 a gallon that's $35.00.

How many gallons will my trip use? Gallons used is distance divided by MPG. A 300-mile trip at 30 MPG uses 10 gallons. Turn on round trip to double the distance.

What is cost per mile? It's the total fuel cost divided by miles driven — how much fuel you spend for each mile. At $3.50 a gallon and 30 MPG, that's about $0.117 per mile.

How do I split gas money fairly? Tick Split the cost and enter the number of people. The total is divided evenly so everyone pays the same share.

What MPG number should I use — city or highway? For a long road trip, the highway figure is closest. For mixed or stop-and-go driving, use the combined rating or, better still, your own real-world average from tracking miles against fill-ups. City driving and a heavy load both lower MPG, so a real number gives a more honest estimate than the sticker.

How much does it cost to drive 100 miles? Divide 100 by your MPG to get the gallons, then multiply by the gas price. At 25 MPG and $3.50 a gallon, 100 miles uses 4 gallons and costs about $14. Plug your own numbers in above to get an exact figure for your car.

Does an electric or hybrid car change this? This tool is built around gasoline and MPG, so it works for gas and most hybrids in gas mode. A fully electric car is measured in kWh and electricity rates instead of gallons, so the gallons-used and cost-per-mile figures here won't apply to an EV.

This is a fuel-only estimate. It doesn't include tolls, parking, wear and tear, or differences in city versus highway mileage.

More free tools