The spellcasting trait is important (DMG Creating a Monster Stat Block):
Spells that deal more damage than the monster’s normal attack routine and spells that increase the monster’s AC or hit points need to be accounted for when determining the monster’s final challenge rating.
(Monster Manual > Introduction > Special Traits)
You can change the spells that a monster knows or has prepared, replacing any spell on a monster’s spell list with a different spell of the same level and from the same class list. If you do so, you might cause the monster to be a greater or lesser threat than suggested by its challenge rating.
The same goes for it's Grim Harvest feature (DMG Creating a Monster Stat Block):
Some special traits (such as Magic Resistance), special actions (such as Superior Invisibility), and special reactions (such as Parry) can improve a monster’s combat effectiveness and potentially increase its challenge rating.
Your offensive CR calculation is incorrect.
- Spellcasting is a more complicated feature than your calculations give it credit for. You need to calculate the spells damage for each slot to figure out which is the most damaging for that level (over 3 rounds) and then apply that damage.
- Additionally you are incorrectly making a downwards adjustment for the Save DC variance.
(DMG Creating a Monster Stat Block)
If a monster’s damage output varies from round to round, calculate its damage output each round for the first three rounds of combat, and take the average.
(DMG Creating a Monster Stat Block)
Don’t worry if the save DCs aren’t matching up with the expected challenge rating for the monster. Other factors can affect a monster’s challenge rating, as shown in later steps, and you can always adjust the save DCs later on.
The results are:
- 6th Level
- Cloudkill: 10d8 * 3 rounds * 2 creatures = 162
- 5th level
- Blight (over two rounds): 9d8 * 2 rounds = 40.5 * 2 rounds = 81
So over 3 rounds the Necromancer can output an impressive 243 points of damage. This is an average of 81 points of damage per round.
This puts it's Offensive CR due to DPR at 13. The suggested attack bonus for a CR 13 creature is +8, the necromancer has +7.
Rules from DMG for adjusting Offensive CR (DMG Creating a Monster Stat Block)
Now look at the attack bonus suggested for a monster of that challenge rating. If your monster’s attack bonus is at least two points higher or lower than that number, adjust the challenge rating suggested by its damage output up or down by 1 for every 2 points of difference.
This is less than 1 point of difference so we don't adjust the CR for that.
Thus it's final Offensive CR calculation is 13.
Your calculation is missing the spellcasting adjustment. The Grim Harvest feature is also an important one you are missing. It will have a material impact on the Defensive CR as it effectively raises the Necromancer's hit points.
This is particularly critical when you take into account that the Necromancer is very close to the upper threshold of the CR 1 creature.
Lets take it into account.
Maximising life gain using Offensive Spells
Using the offensive CR calculation, if the monster wants to maximise it's damage it will cast the Blight spell twice. This outputs an impressive 81 points of damage on average, which will kill many monsters at CR 1, it would most definitely kill many PCs in tier 1. Since this is a necromancy spell it is likely that this combined damage would kill at least one creature, gaining the necromancer 3 * 4 = 12 hit points.
If instead we assume the necromancer wants to maximise their chance of killing something then they should choose their circle of death 6th level spell, which outputs 28 points of damage. This is certainly enough to kill something like a rat or a fly (which is likely given it's 60ft radius!). This would gain the necromancer 3 * 6 which is 18 hit points.
Adding these two together the max hit points the Necromancer would regain is 30 over the first 3 rounds of combat. This averages out to be 10 points of healing on average.
Maximising Life gain using False Life
If instead the Necromancer wants to maximise their hit points gain they would cast the false life spell at 6th level in the first round. This would add 1d4 + 4 + 5*4 = 26.5 temporary hit points
Either of these two combinations bumps the Necromancer up to a defensive CR of 2.
The average of it's Offensive CR and Defensive CR is (2 + 13)/2 = 7.5. This rounds up to 8. Almost but not quite there.
Adjusting for the fact that Necromancers come with Friends! (as Necrotic resistance)
The Necromancer has the ability to make additional friends (zombies and skeletons). These creatures add effective hit points and DPR to the Necromancer. Using their 6th level slot it's possible for the Necromancer to raise 5 skeletons or 5 zombies. This will have a material impact on the CR of the creature.
The fact the Necromancer has Necrotic resistance will also increase it's CR in some situations, but it's not straightforward to figure out the effect of this on the CR as it's a more uncommon damage type...but one that a PC could plausibly use a lot depending on their specialisation.
The Animate dead spell on it's own is likely enough to bump the Necromancer from a CR 8 encounter to a CR 9 encounter.
The statement "these creatures add effective hit points and DPR to the Necromancer" isn't obvious. How do you justify this?
The justification is that the Necromancer can bring additional threats to the encounter (or is easily justified to start with those extra threats) that add HP and damage output to the encounter. An encounter with a Necromancer will usually be an encounter with the Necromancer and multiple other threats. Thus if you think about the Necromancer as a self contained encounter, you can think about the Zombie/Skeleton HP & DPR as being the Necromancers HP and DPR. It's not quite correct, but it's a good enough approximation for this process.