Scott Barbour/Getty Images
The polls up until Thursday have shown that the balance has swung from the Remain vote to Leave, and then back again.
All this means it's really too close to call.
Leading up to the vote, more attention has been given to apocalyptic market scenarios in the event of a Brexit than to what would happen if the UK votes to stay in the EU.
Some of the forecasts have been grim. HSBC estimated this week that if Britain votes to leave the EU, the pound could fall by 15% against the dollar and gross-domestic-product growth could be 1 to 1.5 percentage points lower in 2017 than it would have been otherwise.
It's likely central banks around the world would be forced to intervene and calm the markets. Here's how analysts at Barclays sees the major ones acting: