Wharton, who turns 24 early next month, has extended his stay in his home county for another three years, at least until the end of the 2028 season.
The tall right-hander from Huddersfield has scored three centuries for the first team since making his debut in the coronavirus-shortened summer of 2020.
He scored once in T20 cricket in 2023, scored 111 not out in a 26-run win over Worcestershire in the Vitality Blast, and scored twice in last summer's Rothesay County Championship promotion game.
His first century came at Chesterfield at the end of June, when he hit 188 in a massive innings win against Derbyshire.
Wharton's second red-ball hundred will live long in the memories of all who witnessed it.
He scored an astonishing 285 in the late-season draw against Northamptonshire at Headingley, a match that secured the county's return to Division One.
This was the fifth highest ever individual first-class result at Headingley and the eighth highest in Yorkshire history.
Wharton scored 833 runs in nine games in the Championship last summer, the second best result in the Yorkshire side, and 1,196 runs in all competitions.