The 20-year-old centre-back made 12 appearances this season as Pompey won the League Two title, and has played 50 games in total for the club.
Whatmough said: "In the past few years I've seen a lot of hard times as the club struggled and slid downwards through the leagues.
"But now we are on the way back up again and it's great to be involved and play a part in that."
Find all the latest football transfers on our dedicated page.
Portsmouth defender Jack Whatmough has signed a new two-year contract.