Quote:
Originally Posted by zyttocs
The formula will also have to account for the cost of any fuel that may have still been in the plane from maybe up to 3 previous fueling. An average isn’t good enough, it needs to calculate the exact cost of fuel used.
Anyone know where to find the formula?

You said an average isn't good enough. KME9418 pointed out that the fuel molecules mix but that doesn't mean your formula and method for expense tracking can't assume that they stay separate.
You could treat the situation like tracking investment shares. First in/First out. Since you don't want to use an average, I suggest you consider the fuel loads will burn in the order they are bought.
Tracking it the opposite way by assuming any fuel added to what's there burns first or using an average is going to make the situation much more difficult to track over time. Both of those options leave the potential for fuel purchased months ago to still be in the formula, so I wouldn't recommend those methods.
Using your example:
400 gal @ 6$/gal were in the aircraft = $2400
300 gal @ 5$/gal were added = $1500
On your 500 gal trip, you used all of the fuel purchased at $2400 and $500 worth of the most recently purchase load (100 gal).
Total cost of the trip = $2900
You now have only the 200 gal valued at $1000 remaining to track on any future trip along with any additional fuel added.
I wrote an excel spreadsheet that does this but I can't seem to post a screen shot to use as a reference. PM me if you want me to email it.