Rio de Janeiro knows how to throw a party. But now that the dust has settled after the carnival celebration of hosting the Olympic Games, what state has the city been left in?

The benefits of hosting the Games are advertised endlessly - "boost to the local economy" and "leaving a legacy" are two all-time favourite quotes. However, do these proclamations ever materialise, and can the benefits of hosting an Olympic Games ever outweigh the costs?

Cost and benefit

It has been estimated that Rio 2016 cost $12bn. By way of comparison, London 2012, which was designed to be a low-cost affair after the $42bn extravaganza that was Beijing 2008, cost $15bn in total. Whilst this might suggest that Rio 2016 was relatively inexpensive, there is considerable opinion that Brazil could ill-afford to host the Games in the first place.

Sydney 2000 provided the blueprint for hosting a "sustainable Olympics"; costing only $5bn but delivering venues that could be used for a wide variety of purposes in the future, and which continue to generate income in the region of $750m per year for New South Wales.

Athens 2004 remains arguably the least sustainable Olympic Games ever, with its disused and crumbling facilities a lasting reminder of the perils of getting it wrong. Hosting the Olympics in 2004 did not put the Greek economy into its current ruinous state, but, at an estimated loss of $14.5bn, it was a significant contributing factor. Indeed, the post-Games shortfall averaged $50,000 per household.

The full picture?

We cannot accurately gauge the success (or failure) of the Games without acknowledging the long-term effect on the country – but this is impossible to measure precisely.

A government survey estimated somewhat vaguely that London 2012 will bring "tens of billions of pounds" into the UK by 2020, but how much of this will flow directly from hosting the Olympics? And, in a developing city like Rio, how much investment reaches the poorest inhabitants who face issues far removed from the glamour of the Games, such as toxic water pollution and high levels of violent crime?

It is clear that building brand new rail links to serve a new stadium on the outskirts of a city, or massive hotels that will soon be left empty, will be of little value to the lives of its residents now that the "Greatest Show on Earth" has rolled out of town.

Statistics show that the cities that bid for, but do not win, the right to host the Olympics experience a similar increase in national exports as the eventual host city. The mere act of bidding alone can showcase a city's name on a global stage, and demonstrates a willingness to grow and cultivate an economic upturn.

However, the withdrawals in bidding for the 2024 Olympics suggest that potential hosts are increasingly looking elsewhere to invest their cash. The fear of splurging billions of taxpayer dollars on a 3-week sporting folly with no real guarantee of lasting economic benefit is scaring off potential Olympic suitors, and it is difficult to blame them.

Getting it right

It's a difficult trick to perfect; even London 2012, viewed largely as a success, faced criticism for running over budget, failing to redevelop the East End with affordable housing, and selling the largely taxpayer-funded Olympic Stadium to West Ham for only £20m.

However, when done correctly, the Olympics can transform a city.

The most successful Games, including Sydney 2000, Barcelona 1992 and Los Angeles 1984 (which returned a $200m profit), utilised a lean budget, as many existing venues as possible, and private investment rather than taxpayer money. Barcelona invested most of its budget in new roads and sewage systems which are still in use by the city today, and has finally emerged from Madrid's shadow, transforming into one of the most popular tourist destinations in Europe.

However, these success stories are becoming more of a rarity, as cities are finding it increasingly difficult to justify that level of spending with no guarantee of success. Waking up to the reality of a post-Games hangover is always painful, but Rio, currently mired in socio-political unrest, is suffering a headache worse than most. That's enough to put anyone off hosting in the future.