It’s hard to believe that you can get a critical hit with spells in 5e, but it’s true. What makes this feat even more amazing is how easy it is to achieve. There are three things that make up the crit success rate: your spellcasting ability modifier, your spell attack bonus and whether or not you have advantage on the attack roll. The spellcaster’s ability modifier is the last one we’ll talk about.
The higher your bonus, the more likely you are to successfully critically hit a creature with an attack roll of 20 or below. For example, if you have advantage on an attack and then cast “charm person” (a level two wizard spell), there’s no question that this will be successful because your charm person has a crit success rate of 100%.
On the other hand, casting either “fog cloud” (which is only at level three) or “mage armor” has a much lower chance of hitting for critical damage – it would need to be against something who was within reach and had less than 18 AC in order to do so.