# Is XP needed to level accumulated or absolute? [duplicate]

In D&D there is the need to gain experience by doing some activities or battles, but that experience obtained is added as a total or by level? For instance, if my character is level 2, 900 xp is needed to advance, so I need exactly 900 points or just the 600 remaining from the level I'm actually (300 for level 2)?