Mr Johnson is to self-isolate in Downing Street while he recovers from the highly infectious COVID-19.
Several members of Downing Street staff have also been quarantined – it is not clear if this includes figures such as the Chancellor of the Exchequer or Health Secretary.
A Downing Street spokesperson said: “After experiencing mild symptoms yesterday, the Prime Minister was tested for coronavirus on the personal advice of England’s Chief Medical Officer, Professor Chris Whitty.
“The test was carried out in No 10 by NHS staff and the result of the test was positive.
“In keeping with the guidance, the Prime Minister is self-isolating in Downing Street.
“He is continuing to lead the government’s response to coronavirus.”
If Mr Johnson becomes more unwell over the coming days, it is expected that Dominic Raab will temporarily carry out the functions of Prime Minister.
In a tweet, Mr Johnson said: “Over the last 24 hours I have developed mild symptoms and tested positive for coronavirus. I am now self-isolating, but I will continue to lead the government’s response via video-conference as we fight this virus.
“Together we will beat this.”
So far in the UK, there are more than 11,600 confirmed cases of coronavirus, with 578 people dying from the disease.