Cheaper Gas Calculator (spreadsheet)

Is is worth driving to a more distant gas station to buy gas that's slightly cheaper? Here's a spreadsheet to find out. Just copy and paste into cell A1 in your favorite spreadsheet program, then enter your own data in cells A1 through A6. Your savings in cells A14 and A15 should be a positive number to make the trip worth while.

In cells A5 and A6 just put the one-way distance to the away station. The spreadsheet automatically calculates the round-trip cost.

Tested in Excel, OpenOffice Calc and Gnumeric.

15tank size (gallons)
29.55miles per gallon
3.619local price per gallon
3.599away price per gallon
2.00miles to local station (one way)
5.00miles to away station (one way)
  
=A1*A3cost to fill up at local station
=A1*A4cost to fill up at away station
=A8-A9savings from cheaper gas
  
=(A6-A5)*2extra round trip distance to away station
=A12/A2extra gallons to drive to cheaper station and back
=A13/A3extra travel cost to away station (based on local gas price)
  
=A10-A14savings (loss)
=A16/A1savings (loss) per gallon