Thanks for helping out. Would it be much easier to just make the stat cap higher? For example, I would be able to do something much simpler if I had ATK and DEF go up to 1000 or so?
Sort of. The problem is the 60K damage more than anything. Even if we throw out DEF that is still 59500 damage increase over the course of the game (from 50 to 60000) which, using a linear equation is (60000 - 50) / (1000 - 16) = 59500/984 = 60.47 points of HP each point of ATK needs to increase by to hit your target. Still, this does mean the formula (60.47 + x) * a.atk - x * b.def will do what you want (let x be how much you want 1 point of DEF) to reduce damage by, if you set the upper cap to 1000 for ATK/DEF.
However, this has some serious problems, which you will notice in testing quickly, which is going up just 1 point in ATK is a huge boost, and a high enough DEF = 0 damage. An exponential formula will fix some of this, but then you don't see the high damage until much later. If you are ok with that, here is one that works with your original idea (16 ATK -> 50 damage, 250 ATK -> 60K damage):
74.709 * e^(0.0317*a.atk) - 37.355*e^(0.0299* b.def).
This formula assumes that someone with 0 DEF takes 2x the damage you posted (so 16 ATK to 0 DEF does 100 damage, 250 ATK to 0 DEF does 120000 damage).
(^ is raise to power. Not sure the javascript command for that one, so may need to ask around. e is the number 2.71828..., and you may have to type that in place of e as not sure if there is a command for e in the code).
PS: You can get these formulas in Excel by using the trendline command. It needs 3 points though (I assumed 100 ATK -> 1000 damage, seemed a nice middle point), else it does strange things. I had it make one for ATK only and one for DEF only and subtracted the two to get the formula above.