7

I'm trying to understand how to calculate IVs range in order to calculate Pokémon Max CP. I have the following info:

Pokemon: Exeggcute
His base stats are 110/132/120 (Atk/Def/Sta)
CP now: 176
HP now: 42
Dust cost: 600
-Not powered up
Trainer level 11

What's the formula and calculations I have to do in order to get the Pokémon's INDIVIDUAL stats?

I'm trying to figure out the formulas used in http://www.pgoiv.com

https://docs.google.com/spreadsheets/d/1wbtIc33K45iU1ScUnkB0PlslJ-eLaJlSZY47sPME2Uk/htmlview?usp=sharing&sle=true#

I'm not looking for automatic tools! I'm looking for the formula used for this calculations.

6
  • Possible duplicate of How to tell Max CP?
    – lois6b
    Jul 23, 2016 at 12:12
  • I don't see any formula for calculation of invidual stats in the given link
    – TheUnreal
    Jul 23, 2016 at 12:34
  • You can directly view the formulas, if you're familiar with spreadsheets. Simply replace the htmlview in that link with edit. I strongly suggest that you File => Make a copy before poking around, to reduce the lagginess of the spreadsheet.
    – Schism
    Jul 23, 2016 at 16:23
  • 2
  • @DragonrageI'm afraid you didn't read my question, I need the formula for calculating this IVS, I didn't ask what are they or a link for auto calculation!
    – TheUnreal
    Jul 23, 2016 at 18:22

2 Answers 2

11

In summary it uses trial and error. There is a sheet of game data which has base stats and then a bunch of functions that just try different values of IV that would match the numbers you have given it. Since a given CP/HP combination can have multiple possible sets of stats it suggests levelling it up and trying again and this way it can eliminate some of the incorrect possibilities.

In more detail this is the algorithm that is uses...

  1. It works out level of Pokémon (and levels can be halves as well as whole numbers) by the stardust cost of the next upgrade (table is in the game data sheet). The "powered up?" column determines whether these half levels are actually allowed. If "powered up" is TRUE then it will allow half levels, otherwise the level must be a whole number. I assume this is because pokemon when caught will always have an integer level.

  2. It then loops through all possible levels getting all the combinations of stats that work for that.

    2.1. First for a given level it works out possible stamina values. Each level has a CP multiplier (in the game data sheet). IV stamina can be anything from 0 to 15. It adds this value to the base stamina of the pokemon and multiplies it by the CP value. It then takes the floor of this value (so taking just the whole number part so 59.9 would be 59). If this matches the HP you were given then the stamina is a valid possibility.

    2.2 Attack and Defence are also between 0 and 15 and it tries all 256 combinations of those with the possible staminas. It works out the CP for each possible combination and any that match the CP you have given it are added as possibilities.

    2.2.1 CP is worked out by taking the attack ((base+IV)*CPMultiplier), the square root of the defence ((base+IV)*CPMultiplier), and the square root of the stamina ((base+IV)*CPMultiplier), multiplying them together and dividing by 10.

  3. This gives you your list of possibilities.

  4. Once you try again after a level up because of the way the rounding works some of the previous calculated possibilities will likely differ by 1 (or maybe more) and therefore can be discounted. Do this enough times and it will work out a unique set of values for the stats.

The Dratini example should show you how this works. Follow through the maths on each of them to see how it works.

If you have any questions on specific bits of this operation then let me know and I'll see if I can clarify anything.

Source: This information is all derived from reading the scripts in the script of the sheet. You can see the code once you have copied the sheet for yourself by clicking on "Tools...Script Editor..."

13
  • Finally a comment on what I'm talking about. You comment is a good way to start, and I would love if you can help me further with making the formula in a math way.
    – TheUnreal
    Jul 24, 2016 at 15:34
  • Managed to calculate the pokemon STA IV! Couldn't understand how to calculate and atk and def iv's from it
    – TheUnreal
    Jul 24, 2016 at 17:40
  • The point of my answer is that there isn't really a standard calculation - there is no formula that you can put numbers into and it spits out the right value. You just have to try values and see if they fit the data you have available. An example with stamina which is relatively easy is that if a pokemon has 50HP then that might be a pokemon at level 10 with high stamina or it might be a pokemon at level 10.5 with lower stamina. If you want to work out the full stats you basically have to go through this algorithm.
    – Chris
    Jul 25, 2016 at 8:45
  • Yeah, I understood the way of calculating the stamina, but I couldn't understand the way of achieving the right invidual stats (range) of the attack and defence stats.
    – TheUnreal
    Jul 25, 2016 at 12:11
  • For each possible level/stamina combination you have worked out you need to try all 256 combinations of attack and defence and calculate the CP if the pokemon had those values. If the CP matches your pokemon then you know that the combination of level, stamina, attack and defence are valid possibilities. Repeat until you have all the possible combinations of stats that your pokemon might have. There is no formula. It is just trial and error to find the correct possibilities.
    – Chris
    Jul 25, 2016 at 12:38
0

https://pokeassistant.com/main/ivcalculator?utf8=%E2%9C%93&search_pokemon_name=Bulbasaur&search_cp=446&search_hp=53&search_dust=1300&search_powered=0&search_pokemon_id=1&evolver=true&lastmon=133&resubmit=21+15+15+2&commit=Find+IVs

There are some formulas on here that you might consider looking into and reverse engineering the spread sheets that have been posted on this forum should lead to the formula. I would do it for you but I am busy today.

EDIT: Keep in mind that for these to work you also need some of the data mined game data regarding the base stats of all the Pokemon in this game and the CP multipliers which both can be found on the spreadsheet you posted to begin with.

EDIT: Just in case you are to lazy to actually look

HP = (Base Stam + Stam IV) * Lvl(CPScalar)

CP = (Base Atk + Atk IV) * (Base Def + Def IV)^0.5 * (Base Stam + Stam IV)^0.5 * Lvl(CPScalar)^2 / 10

2
  • The formulas you posted are for calculating HP and CP, not invidual IV's which used as params..
    – TheUnreal
    Jul 24, 2016 at 15:34
  • @TheUnreal you should get the reverse formula from that
    – Zorgatone
    Jul 26, 2016 at 9:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .