There are also a few assumptions baked in:
1. Crits aren't handled at all. Nor are Crit-Failures
2. At level 20, the Barbarian always has STR of 20, before Primal Champion is applied (so the Primal Champion has 24 STR)
3. They're using a non-magic weapon, so Primal Champion Barbarian has +13 to Attack, and +7 as their damage modifier, non-primal champion Barbarian has +11 to attack and +5 as their damage modifier