Penny Mordaunt, the only other candidate who formally declared a bid, pulled out of the race just minutes before the formal announcement on Monday.
Sunak secured the overwhelming support of MPs and will be installed as PM without a vote of the party membership.
The exact timetable for him to formally takeover from Liz Truss as PM has yet to be set out.
He delivered a speech behind closed doors to Tory MPs at 2.30pm shortly after his victory was announced.
It marks a dramatic comeback for Sunak, who lost out to Truss in the previous contest which only ended last month.
To make it onto the ballot, Sunak and Mordaunt had to gain the support of 100 MPs.
Sunak easily crossed that threshold, winning the backing over over half the 357 MPs.
But despite a last minute push on Monday, Mordaunt fell just short and is understood to have secured the support of 90 MPs.
In a statement posted on Twitter, Mordaunt said: “Rishi has my full support.”
Boris Johnson dropped out of the race on Sunday despite claiming to privately have enough support.
At 42, Sunak will be the youngest UK prime minister of modern times. He will also be the first Hindu PM.
He will be the UK’s third prime minister in seven weeks, with Johnson having stepped down on September 6. Truss then resigned last Thursday.
Angela Rayner, Labour’s deputy leader, demanded Sunak trigger a general election.
“The Tories have crowned Rishi Sunak as prime minister without him saying a single word about how he would run the country and without anyone having the chance to vote,” she said.
Lib Dem leader Ed Davey said the Conservatives have “installed another out-of-touch” prime minister, adding: “The only way to end the chaos is a general election now.”
Sunak does not have to hold a general election until January 2025 at the latest, despite pressure to do so from opposition parties.