D&D4 Wiki

Experience points are an abstract means of measuring a character's power progression.

Encounter experience reward[]

In general, each encounter that includes a reasonable risk of failure (and a tangible cost to adventurers for that failure) has an XP reward associated with it. Likewise, situations without a risk of failure or where failure has no significant resource costs or story ramifications have no XP reward. [RC:291]

In general, overcoming an encounter qualifies for a reward, whether it's killing, routing or capturing combat opponents during combat, meeting the success conditions of a skill challenge, and so on. If there is no risk of failure, the characters do not get XP. Additionally, non-encounters do not provide XP, such as triggering a random trap in a hallway (unless said trap is strong enough to constitute as an encounter or is part of an encounter itself.) Avoiding an encounter provides no benefit, but sneaking past one qualifies for the reward. [DMG:120]

To determine the reward from an encounter, total the experience reward of individual elements, and divide the result among the party.

Quest experience reward[]

Quest rewards provide a set amount of XP to each player that participated in the quest, and are not divided amonst the party.[RC:292] If a quest is worth 100XP, each player involved is likewise awarded 100XP.

The Dungeon Master's Guide contains an older system of distributing quest rewards based on the number of players, generally XP amounts well beyond the standard quest XP table. If you see them in use (e.g. with as in Keep on the Shadowfell), these XP values are instead divided among the party members.