21 Armor Class
A Forge domain cleric or a fighter can achieve 21 Armor Class if you are allowed to sell starting gear to buy others. Technically, the rules only allow you to buy starting gear if you substitute your gear for rolled wealth:
When you create your character, you receive equipment based on a combination of your class and background. Alternatively, you can start with a number of gold pieces based on your class and spend them on items from the lists in this section.
... However, I have never been at a table that didn't houserule permission to purchase additional starting gear with the money from your background, and most tables I've sat at allow for the selling of starting equipment (sometimes for full-price and sometimes for half-price) to purchase different gear.
If this is allowed at your table, you simply take the Inheritor background from Swords Coast Adventurer's Guide and select a piece of jewelry whose sell value is greater than 1,500 gp so you can purchase Plate armor. Note that the Inheritor background is very GM dependent, so you will have to get GM permission to inherit such a valuable item:
Choose or randomly determine your inheritance from among the possibilities in the table [which includes "A piece of jewelry"]. Work with your Dungeon Master to come up with details...
One such piece of jewelry mentioned in official rules that carries high enough value even at half-cost selling is the jeweled platinum ring found in the art objects listings in the Dungeon Master's Guide
Now that you have Plate armor, here is how you get 21 AC:
- Plate Armor
- Blessing of the Forge or Defense Fighting Style
What if I can't get the jewelry or buy and sell starting gear
In this case, the best build relies on rolling two 18s via rolled ability scores and assign them to Dexterity and Constitution. Then you will have to play a barbarian of a race that gives +2 Constitution or +2 Dexterity. This hinges on the Unarmored Defense feature that barbarians get:
While you are not wearing any armor, your Armor Class equals 10 + your Dexterity modifier + your Constitution modifier. You can use a shield and still gain this benefit.
I recommend the Beasthide Shifter in Wayfinder's Guide to Eberron as it provides +2 Constitution and also possesses a trait to gain an additional +1 AC for 1 minute once between rests:
Whenever you shift, you gain 1d6 additional temporary hit points, and while shifted, you have a +1 bonus to your AC.
Using this build here is how you get 21 AC:
- Unarmored Defense
- Base: 10
- Dexterity and Constitution (in either order): +4 and +5