I have created a homebrew lich that runs a massive evil necromancy organization in my campaign which revolves around a plague. He is meant to be an extremely tough challenge and is the final boss of a very long campaign. He is extremely old and has gained a substantial amount of power, not only in his own abilities but in the form of magical items. A lot of his character revolves around the chill of the grave, and he is said to be so powerful that just being near him is enough to physically and spiritually exhaust someone. So my question is, have I calculated the challenge rating correctly?
I started with a desire to create a monster with a challenge rating of 25, using the proficiency bonus of +8. He is a 20th level caster of medium size, giving him 20d8's in damage dice and a +100 to hp with his high constitution bonus. His effective hit points are 415 after the bonus for damage immunities and legendary resistances, bringing his defensive challenge rating to 21 with his 19 in AC.
Offensively, he has a very high bonus to hit and saving throw DC with his high Intelligence and the bonus from the Robe of the Archmagi. When it comes to damage output, however, I was very unsure as to how to calculate it because of the complicated nature of spells. I assumed that is must be around 30ish due to the fact that his bonus to hit and saving throw DC are so high they aren't even on the table on page 274 of the DMG.
Taking the average of those results, I assumed the CR to be 25, and 26 with the additional damage capabilities of lair actions.
Did I do this correctly, or is there something I messed up on?