PokéBase - Pokémon Q&A
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.

edited by
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

6 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.

selected by
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)
Hey I would like to put this in a spreadsheet but I'm not good with math.  Could you help me to break this out so I can transfer it to Excel?
This is going to sound stupid, but what does Base stand for. I used my Defense stat for a Pokémon that I know has specifically 30 IV and worked backwards using the IV formula. I got 18 1/3 =Base. Help please