The rules for encounter building and XP rewards in PF2E are great. If your party is all about the same level and you know how difficult of an encounter you want to throw at them it's really easy to build that encounter. As in so many things, the core Pathfinder math Just Works.
But what is hidden behind it? What if, due to player shenanigans, the encounter ends up being very different than you planned or there is a completely unplanned combat? Or you're just curious about how the encounter math works behind the scenes?
Well, here's how it works: Creatures of level 1 and above are worth 160 XP/level. So, a level 2 creature is worth 320 XP and a level 10 is worth 1600 XP. Creatures of level -2, -1 and 0 are worth 40, 80 and 120XP respectively.
To get the per character XP reward for defeating the encounter, total the XP for the creatures in the encounter and divide by the total PC levels at the table.
For example: an encounter of one level 2 and two level 1s is worth 640XP. If faced by a four person party each of level two, thats 640/(4 * 2) = 80XP per character. Or that same 640XP encounter by a party of two level 2 and one level 1? 640/(2+2+1) = 128XP per character.
Granted, this can get silly if the creature levels are way out of whack, which is why in the encounter building rules they don't have table for creatures more than +-3 levels away from the PCs. But just in case you have an odd party or an odd encounter, the math is pretty easy.