Experience is a measurement of hero's capability. Initially, every hired hero starts with a random number of experience in the range of 40 to 90 points. Experience is gained as heroes explore and battle. When they have enough experience points, they go up a level, which is commonly phrased as "level up" or gaining a level. Gaining a level may have several effects. It always increases one of hero's primary skills by one. Hero classes have different probabilities of which primary skill is increased, but the general rule is that might heroes tend to get more attack and defense while magic heroes get more power and knowledge. Typically when a hero gains a level, he is offered a choice of one of two secondary skills. Additionally, many of the hero specialties are affected by level up.
Typical ways for heroes to gain experience is through combat or from treasure chests. Additionally, Pandora's Boxes, Events and Quests can give experience. The Dungeon town has a special building, the Battle Scholar Academy, which gives 1,000 experience points to every visiting hero. There are also objects on the map which gives experience: The Learning Stone gives 1,000 experience points, the Tree of Knowledge allows a hero to level-up and the Altar of Sacrifice allows to sacrifice creatures or artifacts for experience.
From winning a combat the hero receives one experience point for each health of the enemy creatures he managed to vanquish in the battle (clones, war machines and bonus health from artifacts do not count). Resurrected creatures are only counted once, except Demons raised by Pit Lords. If an enemy hero is defeated or an enemy town is captured during a siege, the hero receives 500 extra experience points. A hero will not receive this bonus if the enemy hero escapes or surrenders. If a hero escapes or surrenders, then that hero does not gain any experience, even if he/she managed to kill creatures from the victorious hero. A hero from whom the enemy hero escaped receives experience for the killed enemy creatures, but does not gain experience for the defeated hero.
Heroes with Learning gain extra experience.
Bug: after reaching level 75 a hero gets level 88 at once (13 more level-ups consecutively). From now on the level-up mechanics shows highly unstable work, including the possibility of falling into an infinite loop of level-ups.
In Horn of the Abyss the overflow of experience was fixed. Maximum possible hero level is 74.