From Bulbapedia, the community-driven Pokémon encyclopedia.
Effort values (abbreviated EVs and previously called Stat XP) are attributes which give bonuses to a Pokémon's stats and improve differently depending which Pokémon they defeat. These bonuses, in the form of effort points, are gained in addition to bonuses gained by increasing level. A Pokémon which increases in level using a Rare Candy instead of battling does not gain any EVs, making it weaker than a Pokémon who increases in level normally.
Roughly speaking, defeating fast Pokémon increases Speed better than fighting slow Pokémon, defeating Pokémon with high hit points improves HP more than defeating Pokémon with low HP, and so on. For example, fighting 100 Machop will improve a Pokémon's attack stat more than fighting 100 Abra of the same level, whereas the Abra will improve the Special Attack stat more. In Generation I and Generation II effort points given are equal to the Pokémon's base stats. For a list of the effort points that Pokémon give away on their defeat in Generation III and Generation IV, see list of Pokémon by effort value yield.
Gaining effort points to increase desired EVs varies from being simple to complicated, depending on whether one wants their Pokémon to fully max out its stats or raise them to balanced heights.
Effort values only appear in the main series Pokémon games, and are not present in the spin-off games, such as the Mystery Dungeon series.
The EV system was introduced in Generation I, where it was also called stat experience or Stat Exp.
The Pokémon data structure contains two EV bytes for each the five stats (HP, Attack, Defense, Speed and Special), starting at zero when caught and with a maximum EV of 65535 for each stat, however, maximum stats will be reached with only 64512 EVs. When a Pokémon is defeated, its base stats are converted to effort points and then added to the EVs. For example, defeating a Mew grants 100 effort points to each EV. (Defeating 646 Mew, therefore, will give a Pokémon maximum EVs in each stat.)
EVs are factored into the Pokémon's stats when it levels up. Additionally, EVs are calculated into stats when a Pokémon is taken from Bill's PC; this is called the box trick. A Pokémon which reaches level 100 can continue to accrue EVs up to the maximum of 65535 in each stat, and use the box trick to have those EVs factored in.
Vitamins add 2560 to one stat's EV, but cannot raise a stat above 25600. Unlike later games, the Exp. Share did not share EVs.
At level 100, the formula for determining the stat difference between a Pokémon trained in that stat and an untrained Pokémon is:
EVs behave the same in Generation II as they did in Generation I. Both Special Attack and Special Defense share the EV for Special. The box trick can still be used.
Generation II introduced the Pokérus, a rare status condition which doubles the effort points gained in battle.
Generation III completely overhauls the effort value structure. Effort points are now separate values from the base stats. Defeated Pokémon give out 1, 2 or 3 effort points to a particular stat, depending on species (see list of Pokémon by effort value yield). However, in battles that do not give any experience (such as in the Battle Tower or if the Pokémon is level 100), Pokémon will not gain any effort points. At level 100, a Pokémon's stats will be one stat point higher in a specific stat for every four effort points gained in that stat.
Pokémon are limited to a total of 255 effort points per stat, and 510 effort points in total. Maximum stats will be reached with only 252 EVs in a stat, however.
Vitamins add 10 effort points, but cannot raise a stat above 100, or raise the total above 510. A new vitamin, Zinc, enhances Special Defense.
A new held item, the Macho Brace, doubles the effort points gained in battle. In combination with the Pokérus, a Pokémon can gain four times the normal effort points.
In Pokémon Emerald, certain Berries that were previously only used to make Pokéblocks can decrease certain effort values by 10 effort points (or to 100 if more than 110), while increasing the happiness of the Pokémon they were used on.
Generation IV's EV system remains unchanged from Generation III.
A new series of items exist which give an additional four effort points per Pokémon defeated. Each applies the bonus to a different stat, in addition to the normal effort points gained. The bonus effort points are also doubled by the Pokérus.