|Denim N Leather|
First off: an encounter with a CR equal to the average party level (APL) is not challenging, it should be pretty easy, barring truly horrible die rolls. APL+1 is a bit tougher, and APL+2 is where fights start getting challenging. APL+4, by comparison, should be approximately an even fight. If the party were to fight a mirror of itself, including gear, feats, spells, and everything, that would be an APL+4 fight.Moving on.
I find the easiest way to do encounter design is to decide how much of a challenge you want the fight to be, ie: APL, APL+1, APL+2, ect.
A tough fight that shouldn't be a TPK was your description, so I'm going to do an APL+3 example. APL +2 could work if you want to be a little more conservative.
First, look up any monster with a CR equal to the APL+3. In this case, that's CR 15, which equals 51,200xp. This is 51,200 xp for an assumed 4 people. To figure out how tough of a fight you need to make for an 8 people party, we do maths.
Divide your xp (51,200) by 4 for 12800. This is your xp budget per person. Take that number and multiply it by your total number of players. 12800*8=102,400xp. This is our xp budget.
Now, you could, in theory, throw a CR 17 baddie at the party, because that's 102400 xp right there. The party might win, but probably with casualties. That monster in question is much much stronger than any individual PC and will probably end lives with a full-attack.
Instead, it's almost always better to use several monsters instead of one big one. This is because of action economy. With 8 players you have 8 sets of actions each round, versus one monster with one. To make that one monster a challenge, it has to be significantly stronger than the PCs.
You can absolutely still have a strongest foe, with supporting ones. I'd generally recommend not having the strongest foe have a CR higher than APL+3, with minion-types to fill in the rest.
For this example, let's start with an adult forest dragon, a CR 15 monster.
We take the xp for the dragon, and subtract it from our total...
This is superb, thank you. I got it now.
And thanks to everyone else for commenting as well!