In Dungeons and Dragons, your armor class, or AC, represents your defense against attacks from monsters.
AC is effectively the difficulty class for attack rolls and thus determines how hard you are to hit with melee and ranged attacks in combat.
Formula to calculate AC dnd 5E.
AC calculations depends on what type of armor you are wearing. For example;
If you have no armor, add the dexterity modifier to the base number 10 and if you have light armor like padded leather, you add the dexterity modifier to the base number 11.

Dexterity measures hand-eye coordination, agility, reflexes, and balance.
Example:
Calculate the armor class of a studded leather whose base number is 12 if your dexterity modifier is 5.

Therefore, your armor class is 17.