This script is designed to do general RNG-aware IV, PID, stat, SID, and legality calculations on Pokémon, although it can be used as a general IV or stat calculator without involving the RNG. It can also calculate the information needed to abuse the RNG to obtain a specific Pokémon, although it is not as full-featured in this respect as tools such as RNG Reporter are. It is mostly designed for checking Pokémon on fourth generation games, although it has a small amount of knowledge of the third generation too; previous generations use entirely different method of calculating Pokémon stats and are not compatible with this calculator.
In order to calulate IVs, you need to enter, at a minimum, the species, level, stats, and nature of the Pokémon you want to check. You should also choose an appropriate RNG method from the dropdown in the "Calculate" row; IVs can be calculated without taking the RNG into account, but in most cases the results will be less accurate. It is also necessary to know the EVs of the Pokémon in question, which will be 0 when it is obtained but increase when it is fed vitamins or gains experience. If you know the EVs but they aren't all zero, check the "EVs" box and enter the EVs; if you don't know the EVs, you must first reduce them to zero by feeding the Pokémon 11 of each of the following berries, or as many as it's willing to eat: Pomeg, Kelpsy, Qualot, Hondew, Grepa, and Tamato. (You can reset afterwards in order to regain your berries and EVs.) Once you've input all the information, click the "IVs from Stats" button and all possibilities will be calculated; if you didn't give much information, there may be thousands or even millions of results, in which case the "Stop" button may be helpful. You can see the PID for a given IV spread by hovering your mouse over the seed shown.
In general, the more information you give, the more accurate the results will be; although the calculator never gives an incorrect answer, it may give a very vague answer if there is little information. For a Pokémon currently on a fourth-generation game, you should definitely give its characteristic, as it can be determined by viewing its stats, and it helps even if not using the RNG. The other pieces of information which help even when not using the RNG are the Hidden Power type (determinable via Veilstone or Celadon Game Corner Prize Exchange in Platinum and HGSS respectively, or by attacking a Kecleon with Hidden Power), and Hidden Power power (which is probably not worth bothering to calculate). Another major factor is the Pokémon's level: the higher the better. One simple way to determine a Pokémon's stats at level 100 is to enter a Wi-Fi battle with someone with the Lv.100 clause on, and viewing its stats from there, and these stats will give a much more precise result than the stats for a low-level Pokémon.
For an RNG-aware check, there's other information you can use without having to raise the Pokémon's level or run around Kanto, Johto and Sinnoh trying to find out tangentially useful information. Knowing the Pokémon's gender and ability (select the Ability/Gender/HP Power box) does not help a non-RNG check, but can sometimes sharply reduce the number of possibilities when the RNG is involved, and these values can be determined directly from the Pokémon's stat screen. Note that its usefulness depends on the Pokémon; for instance, knowing that a Pikachu has Static is useless, but knowing that a Pachirisu has Run Away will eliminate around half the possibilities; likewise, knowing that a Jynx is female is no help at all, but knowing that a Combee is female gives a large amount of information (because most Combees are male, most Combee spreads are male).
If a Pokémon is too low-level to calculate its IVs even with the above information, and you don't have Wi-fi handy to enter an IV battle, you could try using Rare Candy to get more information about its stats. Save first, so you can reset to avoid wasting your candy, then feed Rare Candy to the Pokémon to get its stats at several different levels. You can use the "Rare Candy Info" button to enter the Pokémon's stats at up to 6 different levels. If the Pokémon tries to evolve, let it, because the evolution probably has higher base stats and is thus easier to check; you can note the fact that the Pokémon evolved in the "Species" column. Likewise, if the Pokémon has alternate formes that it can easily change between (such as Rotom or Deoxys), or evolves into multiple Pokémon (Nincada into Ninjask and Shedinja), you can give the stats for all possibilities to help narrow the IVs down to some extent.
A bit of preparation makes IV calculation much more accurate. One of the simplest things you can do is to note the time and date, according to your DS, that you press "Continue" on the title screen; you only need to be accurate to the nearest minute. Check "RNG Seed Info" and you can specify the date and time, and get considerably more accurate results for an RNG-aware IV check than you would get otherwise. As long as you both press A to run through the title screen quickly, and make the capture relatively quickly, you can safely ignore the greyed-out results to narrow the possibilities down further, but should take them into account if you play a lot before making the capture, or if you waited at the title screen for some reason.
If you're planning to do a great deal of capturing before you next turn your DS off, you can get even more accurate results by finding your session RNG seed ("initial seed" in the terminology of some other RNGing tools). Note the date and time as before, then upon starting the game, fly to an area full of high-level wild Pokémon (the grass north of Resort Area in DPP and Mt. Silver in HGSS are good examples), catch one of them, and check its IVs. The first column of the results will have a list of possible session seeds; if you think you know which IV combination the Pokémon you caught has, click on the session seed and it will be used for future IV checks (until you clear it by hand). This is slightly slower than other forms of IV checking, but hugely more accurate (around 4000 times as accurate as checking with no RNG information). Knowing your session seed might also be helpful if you plan to do RNGing; it can be input into other tools, such as RNG Reporter, to help in certain RNGing tasks.
First, make sure that all the information that you've entered is correct; it's easy to specify the wrong characteristic or nature by mistake, for instance, or to forget to specify the species. Also remember that the EVs must be given, or reset to zero. Check the Pokémon's history, from its stats, to work out what method was used to catch or obtain it.
If you're completely sure all the information is correct, including the RNG method, and yet you get no results anyway, then your Pokémon is probably hacked (and thus wasn't generated via the RNG in the first place). Unfortunately, it's impossible to tell for certain that a Pokémon isn't hacked, but this checker checks almost everything (apart from a few bizarre Pokémon-specific rules pertaining to things like Spinda, Unown and Azurill) that can be determined from the game without cheating and is related to the Pokémon's stats. (It's also worth looking for things like an illegal moveset, or the wrong sort of ball, when looking for hacked Pokémon.)
In order to determine the stats of a Pokémon, enter the species, level and IVs you want, choose the nature, then click "Stats from IVs"; you can specify an RNG method, and likewise ability and/or gender, if you want to ensure that the combination you chose is legal for a Pokémon available via that method. If you don't care about an IV (say, Special Attack for a physical sweeper), just leave the appropriate box blank. (Note that breeding Pokémon puts no restrictions on what ability/gender/nature/IV combinations are possible, thus you will always be able to breed the set you need unless it's on an unbreedable Pokémon or needs an event move.) Rows marked as "impossible" for a method J or K calculation are those which are possible for method 1, but not for the method chosen; this doesn't happen very often, but can happen occasionally. If you get no results, it's because the method you chose disallows the IV/nature/ability/gender combination that you want.
You can use the "Use IV range rather than IVs" checkbox to enter a range of acceptable IVs, rather than an individual IV. In the common case where you want an IV to be at least a particular value (if you're aiming for a particular Hidden Power spread, 27 might be a good minimum IV to consider), you can leave the maximum IV box blank; if you don't care about the IV at all, leave both boxes blank for that IV. You can specify things like the wanted nature, gender, ability, Hidden Power power, etc., and only spreads which match your criteria will be returned. Once you're done entering the values you want, click on "IVs from IV Ranges", and you'll get some IV combinations that work. (You don't need to specify the level for this sort of calculation, by the way.)
It's impossible to tell for certain that a Pokémon isn't hacked. However, if the traded Pokémon looks like a method 1, J, or K Pokémon, you can at least use this tool to try to make sure that its stats are legal.
Start off by doing a normal IV check of the Pokémon in question, as described in the instructions above. (Should it turn out to have perfect IVs, and to come from a game like Fire Red or Pokémon XD whose RNG hasn't been cracked yet, yet not be bred, you should be suspicious immediately, although a suspicion is of course not proof in such a case.) Enter as much information as you can; level 100 stats are enough by themselves to IV check a Pokémon normally, but if you want to catch a hacker, you want to enter all the RNG-dependent information too, like nature and gender. For a Pokémon with multiple perfect stats, the characteristic might also catch out a badly hacked Pokémon; and if you cleared EVs, compare the stats with EVs cleared with the original stats before clearing to ensure that there were no more than 255 EVs in any one stat and no more than 510 EVs total.
In the case of a Pokémon apparently caught in the wild, you may also want to check that it comes from a valid encounter slot. Click on the range of frames shown for a method J or K calculation, and a window will pop up listing which encounter slots it is possible for the Pokémon in question to appear in. (The slots for random encounters are a subset of the slots for Sweet Scent encounters, so if the Pokémon couldn't even have been Sweet Scented, it definitely couldn't have turned up at random.) To convert the encounter slot numbers into actual Pokémon, use an encounter slot guide like the ones at eggmove.com (Diamond Pearl Platinum HeartGold SoulSilver). For instance, suppose you received a flawless Timid Staravia that was caught as a Staravia at Lake Verity in Pokémon Diamond. Is this suspicious? Well, Staravia can appear at Lake Verity (using the dongle method), but according to the guide above, only in encounter slot 9. Being caught at Lake Verity (a location in Sinnoh) would imply method J; but the only encounter slots available for a flawless Timid Method J spread in grass are 0, 1, 2, 3, 4, 5, 7, and 8. Unfortunately, the alleged Staravia either has a different history from what was claimed, or it was hacked. (This method works much better with some spreads than others; some spreads can only occur in a single encounter slot and are thus easy to check, whereas some others can occur in almost every slot and give little information via this method.)
Well, as you may have guessed from the question and the presence of the "SID from Stats" button, yes. Unfortunately, in order to calculate your SID (Secret ID) using this tool, you need to have a shiny method 1, J, or K Pokémon caught on the game you want to calculate your SID for; and worse, bred Pokémon, and chained shinies, are not method 1, J, or K, so you'd need to have come across a shiny Pokémon at random. (Two glimmers of hope for people who can't use this calculation due to not having a random shiny Pokémon: you can use a different sort of calculation, not available in this tool, to calculate your SID given six or seven chained shiny Pokémon; and you can RNG just fine without knowing your SID as long as you don't care about the shininess of the result, as it only controls shininess not more competitively relevant things like IVs.) Still, if you have such a Pokémon, calculating your SID is relatively easy: it works exactly the same way as an IV check, except that you must enter your trainer ID (viewable as the OT on your shiny Pokémon, or on your Trainer Card), and use the "SID from Stats" button rather than the "IVs from Stats" button. Each row of the result gives a possible SID; hopefully, if you provide enough information there will be only one possibility, but if you end up with more you could always just try each of the SIDs separately in RNGing to see which works. (Incidentally, this doesn't calculate the SID perfectly, but rather rounded down to a multiple of 8; this is enough accuracy for RNGing shinies, so it's all most people care about. There's no known method, other than using a cheat device or RNGing for the SID in the new game sequence (which involves deleting the entire game file and thus is impractical for determining your SID), to determine the SID more accurately than that.)
Although considerably more limited than tools designed specifically for RNGing Pokémon, this tool is powerful enough to do many of the calculations needed to RNG yourself a flawless wild Pokémon. (It won't help you at all with breeding, though; if you need an egg move on your Pokémon, or a spread that isn't possible via wild capture or Wondercard, use a different tool.) Despite its limitations, one advantage of this tool is that it's noticeably faster than certain other tools when running in a browser with decent JavaScript performance.
Start by deciding on what species, IVs, nature, and ability you want (or by specifying ranges of IVs using the "Use IV ranges rather than IVs" checkbox if you want to try a range of possibilities; unlike some other tools, this calculator is faster the more precise your request, rather than being faster the less precise your request, although of course an over-precise request can return no results at all). You can also specify things like Hidden Power type and power if you need them for your Pokémon idea. Note that Hidden Powers other than Dark, and natures other than Calm, Docile, Modest and Timid, mean you can't have perfect IVs (except on Wondercard Pokémon where the nature is independent of the IVs), so be prepared to have to flexible with IV ranges in cases where you use this tool rather than breeding a Pokémon (which gives a lot more flexibility). You also need to specify the RNG method you plan to use to generate the Pokémon; this will be determined by which games it appears on and that you have available, and what methods in-game you can use to encounter it. Once you've entered all the information you need, click "Stats from IVs" or "IVs from IV Ranges" to start the calculation.
Most of the information useful for RNGing a Pokémon is shown in the rows at the bottom, or by hovering over the results. The "seed" shown is the Method 1 monster seed (even if you selected a different method); while not directly useful in RNGing, this is the standard value for describing a particular spread that can be compared with that given by other tools, in order to verify that they're both talking about the same Pokémon. The values you probably want to know for RNGing are the session seed ("initial seed" in the terminology of some other tools) and frame number; the frame number is shown in the table at the bottom, and the session seed when you hover your mouse over the delay in the same table. The session seed can also further be broken down into delay, date, and time; one possibility for the date and time is shown when you hover your mouse over the delay. (Note that there are multiple possibilities for session seed/frame combinations and date/time/delay combinations; rather than listing them all, which makes for a rather long list with hundreds of seeds each with hundreds of delays, instead this tool will try to pick a sensible one with a delay and frame that are reasonably possible to reach; unfortunately, many spreads require a really high delay and/or frame number no matter what you do.) If you're using method J or K, there's a chance that the frame number actually ends up negative and thus impossible to hit; in such cases, you can use the "shift" link to pick a different seed/frame combination with higher frame numbers. The actual process of RNGing a Pokémon is too complicated to go into details here; you can find guides elsewhere which explain what to do with the date, time, delay and frame number once you have them. (Note that the frame numbers given by this tool don't apply a monster frame correction; you'll need to allow for the monster frame of the Pokémon you want yourself.)
For Method 1 and Wondercard Pokémon, that's pretty much all the information needed to RNG them (note that random-nature Wondercard Pokémon seem to end up with random natures independent of a nature that would normally be forced by the RNG, and so you may have to repeat the process many times to get the nature you want). For methods J and K, though, there are two other very important pieces of information: what sort of Synchroniser (if any) is needed to actually hit the spread you want, and where on the world map you need to go to capture the Pokémon in question (except in the case of legendaries, where the second point tends to be pretty forced by the game). You can determine both pieces of information by clicking on the frame range (not the "shift" link) for the spread you want in the results table; this opens up a new window with the possible encounter slots. Note that methods J and K generally give a range of frame numbers rather than a single possibility; this window will help you decide which you want, assigning each of the possible frame numbers to its corresponding encounter slots for grass, caves, surfing, and fishing. You can use an encounter slot guide like the ones at eggmove.com (Diamond Pearl Platinum HeartGold SoulSilver) to translate these slot numbers into Pokémon species; typically, you would search the encounter slot list to find which slots and locations the Pokémon you wanted appeared at, and then see which frames and methods allowed the Pokémon you wanted to appear. Once you've decided on a frame number, you can hover over it with the mouse (or look at its colour) to see what sort of Synchronizer is needed: one of the right nature (green), one of any nature (cyan), or no Synchronizer at all (red).
Now you have the information you need, all you need to do is actually hit the time/date, delay, and frame you want; there are other guides and other tools to help with that. Happy RNGing!
The following RNG methods can be taken into account by this calculator:
This method is used by all fourth generation Pokémon that are unaffected by Synchronize, yet not hatched from an Egg nor gifted via Wondercard. This includes in-game gift Pokémon (e.g. the Abra that you can buy from Game Corner in HGSS), and a few legendary Pokémon. Third generation gift Pokémon probably also use this method, but the seed/delay/frame information shown by this calculator is strictly fourth generation only and thus not useful for third generation RNGing.
Note that any set that is valid in Method J or Method K is also valid in Method 1, just with a different frame number. Thus, if you're lazy, you can just leave the setting at its default of Method 1 for the vast majority of fourth generation Pokémon. Even after results have been calculated, you can change the method dropdown between 1, J, and K to recalculate frame numbers (this doesn't work with the other methods, though). Incidentally, the reverse is not quite true; although the vast majority of method 1 spreads work in methods J and K too, there are a few that don't.
This method is used by all "ordinary" wild Pokémon in Diamond, Pearl, and Platinum, and also for legendary Pokémon in those games that are affected by Synchronize (such as Azelf and Heatran). The implementation here allows for Synchronize, Stench and Illuminate, but not for other abilities that affect the appearance rates of wild Pokémon, and for obtaining Pokémon via random encounter in the wild in caves, grass, or water, Sweet Scent in those locations, or fishing. Wild Pokémon caught while chaining using the Pokéradar are Method J if found in a non-shiny patch (even if they happen to be shiny), but not if found in a shiny Pokéradar patch.
This method is used by all "ordinary" wild Pokémon in HeartGold and SoulSilver, and also for legendary Pokémon in those games that are affected by Synchronize (such as Ho-Oh and Groudon). The implementation here allows for Synchronize, Stench and Illuminate, but not for other abilities that affect the appearance rates of wild Pokémon, and for obtaining Pokémon via random encounter in the wild in caves, grass, or water, Sweet Scent in those locations, or fishing. Guaranteed shinies, like the Red Gyarados, are not Method K (they use the same method as shiny-patch chained Pokémon).
This method is used by event Pokémon that are picked up at a Pokémart in a fourth-generation game, like the lv.100 event Arceus. For event Pokémon that are distributed via an item (like Oak's Letter for Shaymin), treat them like any other legendary (thus making them Method 1, J, or K).
If you obtained a Pokémon through a method not listed above (say, it's a third-generation Pokémon, or it was bred or chained from a shiny patch), you will not be able to use the RNGing features of this checker; as a result, it will give less accurate results for IV checks and will not be able to carry out many of its other functions at all. However, it should still be at least as useful as most other IV checkers out there. You might also want to set this setting to save time calculating on slower computers in cases where you have easily enough information to do your calculation even without the RNG's help.