Definitions
V = current gallons in tank
E1 = current ethanol fraction (percent ÷ 100)
E2 = target ethanol fraction (percent ÷ 100)
Ep = pump ethanol fraction (percent ÷ 100)
x = gallons of pump E85 to add
y = gallons of gasoline to add (assumed 0 unless you set “Planned fill amount”)
Mode A: Solve E85-only (Planned fill amount blank)
We solve:
(V×E1 + x×Ep) / (V + x) = E2
So:
x = (V × (E2 − E1)) / (Ep − E2)
and y = 0.
Mode B: Split inside a planned added amount A (Planned fill amount = A)
Total added is fixed: x + y = A.
We solve for x from:
(V×E1 + x×Ep + y×0) / (V + A) = E2
So:
x = ((V + A)×E2 − V×E1) / Ep
and y = A − x.
Reminder: This is tank math only. Stoich/AFR/fueling multiplier lives in your higher-level E85 tool. Open it here.