Thanks for using my formulas. I haven't looked at them in a long time and I hope I got them right
The math is not all that complicated, but there's a lot to keep track of. As you may have noticed, I like working in metric units with Plato. This makes calculating the amount of sugar a bit easier. It's easy enough to convert from metric back to US units.
Apparently I did not get the formulae completely right.
I found an issue with the formula for AA (apparent attenuation) it should be
AA = 100 - 100 * FE/OE = 100*(OE-FE)/OE
It seems that you already corrected that.
I found another problem: In E9 you actually want to use the specific gravity (sg) of the wort and the original extract (OE) in Plato. You also need to divide by 100 to get the extract content in g. The specific gravity is needed to convert the wort volume into wort weight. I clarified this a bit in my article by referring to lower case sg. This will get you closer to the 240g extract that should be in the 2 L. Plato is the % extract in a given wort. I.e if you have 2l, which is approximately 2000g, then 12% of that is 240g.
I think that should be it.