Li Shenron
Legend
Pure PC classed NPCs do not translate well to CR.
Check out the DMG page 274. There you will find a quick CR reference chart. Take anything you want to figure a CR for and calculate its defensive (AC and HP) rating and offensive (Attack bonus and DPR) rating and average them. All of these factors will effect the others. For spell or similar abilities use save DC instead of attack bonus when calculating offensive CR.
Just a quick glance at the hit point column will tell you that character level does NOT equal CR. An average CR 1 has over 70 hit points. If you assign a CR 1 to a 1st level fighter its going down really fast compared to any other monster of its supposedly equal CR.
Thats why I make NPCs mostly as monsters adding in some PC abilities and accounting for their effects in the overall offensive/defensive CR calculations.
Yeah but all this sounds like 5e does an appalling job at supporting something as simple as making a Wizard villain of the wanted level, which is a super-common thing in a RPG.
Because I have maybe 2 or 3 ready-made options like the Mage (CR6) and the Archmage (CR12) and that's it. There are at least 18 more CRs to cover, but I have to add more spells one by one and figure out the CR, with guidelines that don't work beyond a very few additions. If I wanted a CR10 Wizard, what do I do?
All in all, the best I can think about is to just create a Wizard (or Cleric or Druid, depending on the story) using the PC rules (not caring much for precision, just a gross design), throw it at the PCs without caring about estimating the CR, and cross my fingers that with bounded accuracy it shouldn't be outrageously off...