I just put the total fuel. The total cost. Fuelly comes up with the cost per gallon for me.
That average octane is 86.5 not 87.5.... Me thinks somebody did a typo.
I hope you're not mixing ethanol with non ethanol. When I played around with octanes. I stuck with no ethanol only. Found smaller amounts of premium worked better. Then changed brands and tried 85 no ethanol only. Found it worked great. Either way.... stay away from ethanol.
You should have your car serviced. There is a problem with your engine or exhaust system. Fixing it early will be cheaper than waiting until it becomes catastrophic. Mixing gas is an insane temporary solution. Just get the car fixed. It might just be an Oxygen sensor, if you are lucky.