Dawn breaks behind the Houses of Parliament and the statue of Winston Churchill in Westminster, London, Britain June 24, 2016.
Global financial markets plunged as results from June 23's referendum showed a near 52-48% split for leaving.
The pound fell more than 10% against the dollar to levels last seen in 1985, its biggest one-day fall in history, and European shares plummeted more than 8%, headed for their biggest ever one-day fall.
Billions of dollars were wiped off European banks' market value, with Britain's Royal Bank of Scotland, Barclays and Lloyds Banking Group the biggest fallers.
Cameron, who lost his gamble betting the nation's future on an outcome he predicted would be catastrophic, said he would resign as prime minister by October.
"I do not think it would be right for me to be the captain that steers our country to its next destination," he said in a televised address outside his Downing Street office.
Quitting the EU could cost Britain access to the EU's trade barrier-free single market and mean it must seek new trade accords with countries around the world. The United Kingdom itself could break apart, with leaders in Scotland -- where nearly two-thirds of voters wanted to stay in the EU -- calling for a new vote on independence.
The EU for its part will be economically and politically damaged, facing the departure not only of its most free-market proponent but also a member with a U.N. Security Council veto and powerful army. In one go, the bloc will lose around a sixth of its economic output. Populist leaders in France and the Netherlands demanded their own referendums to leave.
The vote will initiate at least two years of divorce proceedings with the EU, the first exit by any member state. Cameron said it would be up to his successor to formally start the exit process.
His Conservative Party rival Boris Johnson, the former London mayor who became the most recognisable face of the "leave" camp, is now widely tipped to seek his job.