I'm trying to add an NPC (as explained on pages 186-188 of the DMG) to a DnD 4e encounter, and I'm having trouble finding any information on how much XP to subtract from the XP budget for the encounter. If I have a 2nd level NPC, is it comparable to a standard 2nd level monster (i.e. 125 XP)? Or is it closer to an elite monster (250 XP)? Or is it something that varies according to the NPC's build?
How much XP a monster or NPC is worth is determined by it's role and level.
If you're designing a L1 Solo that's a 500 XP NPC. If you're designing a L5 elite then that's 400 XP.
What the NPC is worth is defined by your design and is based on what kind of NPC you are making.
Generally you only determine these things if you intend for your PCs to enter combat with your NPC.
When an NPC is going to enter combat, he is based on the same rules that monsters are based on. In fact if you want a quick way to make a reasonably designed NPC, grab a monster of the role and level that you'd like to use and just reskin his character and powers to be your NPC.