Meta Battle Subway PokeBase - Pokemon Q&A

What is the formula to calculate IVs and EVs?

2 votes

I assume that IV and EV calculation share the same formula.

Also, state each formula from each generation, if they have different formulas per gen.

Note: I don't want an IV calculator or anything like that. I want the actual formula/algorithm for how to calculate IVs and EVs. Thank you, Indigo.

asked Nov 19, 2013 by !'•-Indigo-•'!
edited Nov 30, 2013 by Pokemaster
From first generation to second
![ Health points (Hp)][1]


![Other stat][2]

This is from the third to the the fifth, doesn't say anything about the sixth
![Health points][3]
![Other stat][4]


  [1]: http://cdn.bulbagarden.net/upload/d/d4/HP_calc.png
  [2]: http://cdn.bulbagarden.net/upload/d/d6/Statcalc_gen12.png
  [3]: http://cdn.bulbagarden.net/upload/8/80/HPStatCalcGen34.png
  [4]: http://cdn.bulbagarden.net/upload/c/c1/OtherStatCalcGen34.png

Did this help?
I think his asking for the calculation of the EV/IV stat itself - not the calculation of the stat utilising the EV/IV
This is the [Source][1] for the Formula



  [1]: http://www.serebii.net/games/iv-calcxy.shtml
What KoD said, sorry.
Though, it was quite helpful, I must say. x)
I think to find the answer to this though is to edit the equation in some way.
I don't want a calculator. I want the actual formula. ;)
Just so you know, regardless of whether you know a specific formula or not, IVs cannot be manipulated in game via any method (although you can perform some techno-wizardry on a computermabob to do so)

Also, in earlier generations, I believe that Pokémon could attain a maximum of 65,000 EVs with no cap on any one stat and with a range of payoffs from Pokémon of the same species (Ratatta could give 1200-1500  speed EVs, for example)
It's just that there are many IV and EV calculators out there, so I think there is a method to calculate these things.
And I don't think that method happened in earlier generations. (I'm not sure, anyway, but I have never heard of such ridiculously high EVs)
Fyi the EV and IV formula won't be the same.
Solumn00b is asking for the formula calculate them... not what you jut answered with.
Reading comments above, l assume what you're looking for is an algorithm not a formula.
If you're looking for the way IV calculators calculate IVs, it'd be best if someone that made one of those programs to answer, or else it'll be extremely hard to find online or not available online at all.
There's a difference between an algorithm and a formula. Oh my gosh, my head is spinning >.<
I would like the way how the IV/EV calculators calculate it. Honestly, I didn't think this question would be so hard to answer - but yes, that's what I want.

1 Answer

5 votes
 
Best answer

The formulas for working out your stats are:

HP = ((2*Base + IV + EV/4 + 100) * Level) / 100 + 10
Stat = (((2*Base + IV + EV/4) * Level) / 100 + 5) * Nature

So to work out an IV or EV for a stat, it's a matter of simply reversing the calculation. If you're not good at algebra it can be a little difficult so here they are. For HP:

((HP - 10) * 100) / Level = 2*Base + IV + EV/4 + 100

IV = ((HP - 10) * 100) / Level - 2*Base - EV/4 - 100
EV = (((HP - 10) * 100) / Level - 2*Base - IV - 100) * 4

For the other stats:

((Stat/Nature - 5) * 100) / Level = 2*Base + IV + EV/4

IV = ((Stat/Nature - 5) * 100) / Level - 2*Base - EV/4
EV = (((Stat/Nature - 5) * 100) / Level - 2*Base - IV) * 4

These formulas have been the same since Generation 3, and as far as I know haven't changed in X/Y. The Nature modifier is 1.1 for positive nature, 1 for neutral, 0.9 for negative nature.

Note: I'm using the normal mathematical "order of operations" to make the formulas clearer, multiplication/division comes first, so for example IV + 2*Base + EV/4 + 100 is the same as IV + (2*Base) + (EV/4) + 100.

answered Nov 30, 2013 by Pokemaster
selected Nov 30, 2013 by Mewderator
Finally! Thank you :D
Hey no problem, it was useful for me as I'm working on an EV/IV calculator.
Ha, I'm trying to work on one as well. I was also curious as to how EVs and IVs were needed. o.O
My teacher and my mom think I'm good at maths but seeing that complicated hunk of text... xD
What are you on about, this is easy to understand, and I'm a child.
Thanks much for the equation.  But I'm finding a difficulty with negative nature stats.  

Example of my situations. Lvl 50 Fennekin, Gentle, 115, 65, 45, 80, 88, 76. Calculator gives me 31, 31, 13, 27, 31, 23. My spreadsheet gives me 31, 31, 11, 27, 31, 23.  Gentle is Lower Defense, higher Special Defense.  The negative stat is the only one that seems to be off.   Each check is only by 2, but it's still off somehow.

Good news is though, it does well with positive stats and still gives me accurate numbers for the great stats (and if the stat is a perfect one even on a negative nature)