It was a great 16 days in Tokyo 2020.
There have been great sporting dramas, new heroes, world records being broken, and a lot of history.
What are the stats from the Olympic Games? Take a look at BBC Sport and Nielsen Gracenote
China beats the US to the top table
The United States is at the top of the medal table for six consecutive Olympic Games. They have won the most medals at all seven Olympic Games.
Japan is third in the medal table with 58 medals, 27 gold and Tokyo 1964 as host.
Great Britain was second in Rio 2016 while London 2012 was third. This is Team GB’s second-best performance at an Olympic Games overseas, behind Rio (67 medals).
For the first time since Beijing 2008, Australia returns to the top six medal tables.
Italy was the only country that won 40 medals at the Summer Games, beating out New Zealand (20 medals), Brazil (21 medals) and the Netherlands (36). Brazil repeated Great Britain's feat, doubling their Olympic medal total within 24 hours of hosting.
Since 1990's reunification of East Germany and West Germany, Germany has not finished in the top six medal tables. At the 1956 Olympics in Melbourne, Germany was not among the top six medal-table teams.
Record breaking world records
Norway's Karsten Warsholm set a new world record by running a remarkable 45.94 seconds in the 400m hurdles race for men. This was one of the most memorable moments at the Games. Britain's historic swimming team also set a new world record in the 4x100m mixed Medley relay.
However, despite concerns about shoe technology being too dominant in athletics in particular, Japan had fewer records.
Simon Gleave is the head of Nielsen Gracenote's sports analysis. He stated that the 22 world records set in Tokyo are less than the 27 set in Rio five years back, despite the addition to sport climbing, which can break records. Only four world records were broken in weightlifting - three to the same person, Georgian super-heavyweight Lasha Talakhadze, compared to eight for Rio.
Team GB won medals at Tokyo in 25 different sports-disciplines - more than any other nation. This chart has some sports grouped together
This was Britain's greatest ever swimming performance.
Great Britain's strength lies in the variety of sport-discipline combinations in which it has won medals. Team GB won medals in 25 different sport disciplines, breaking the Rio 2016 record of 23. As recently as Sydney 2000, Great Britain won medals only in 12 different sport-discipline combinations. China and the USA did not win medals in nearly as many sports as Great Britain.
At each of the four Olympic Games, Team GB has won at least four medals at track cycling and in athletics.
Britain's top medal-winning sport Sports with 4+ gold medals Total medals Tokyo 2020 Swimming, Cycling – Track; Sailing and Boxing; Athletics 12 Gold = 55% 32 Medals = 49% Rio 2016 Swimming, Cycling, Track; Athletics, Rowing; Boxing; Athletics 14 gold = 52% London 2012 Cycling; Track; Rowing. Athletics. Boxing. Sailing 19 gold = 66% 35 medals = 52% Beijing 2008. Cycling – Track; Sailing. Athletics. Rowing
Swimming and athletics provided 56 medals, including 18 golds (50% of total medals) and 46% of all golds.
The US has the most freestyle wrestling medals, nine of which are golds. This is the best total since 1904. Despite the performance of Katie Ledecky and Caeleb Dressel, the number of swimming golds is the lowest since 1992 Barcelona Olympics.
To the annoyance of Michael Johnson, the USA's athletics performances set some unwelcome records. Their seven gold medals in athletics were the lowest ever recorded at the Olympics. The US men also had two gold medals in athletics, a record low. The men did not win any track golds and despite the fact that they won 10 total athletics medals, this was their lowest return in Games history.
China's core sports, including diving, shooting and weightlifting, as well as artistic gymnastics, table tennis, produced 25 golds in Tokyo and 46 medals, respectively (66% and 52%, respectively). China's Olympic record for diving was 12 and shooting was 11.
Eight medals in weightlifting, including seven golds in weightlifting, were also Chinese Olympic records. It was also their best performance in tabletennis (four gold, three gold) since Sydney 2000.
Fourth place table
You don't want fourth place to be the top. This is because it is considered to be the "worst" position. Sometimes, the margins are too small to distinguish between joy and pain.
Rio 2016 saw Team GB finish fourth on 16 occasions. This is a post-war record. They were still second in the medal table.
Fourth place table at Tokyo Games Team. Number of fourth places United States 26 Russian Olympic Committee 14 South Korea 12 Italy 1 France 11 Canada 11 Netherlands 11, China 11 Hungary 10 Japan Germany 10 Source: Nielsen Gracenote
Table of medals for women
Canada's women won 75% of the medals for the team and 71% of all gold medals. This helped Canada improve its position in the overall medal tables.
Great Britain, which sent more female athletes to the Games than the males, finished the Games with Lauren Price's gold in boxing and Laura Kenny as the flagbearer. They were however the only country that ranked in the top 10 in Tokyo for women's events with female competitors winning less than 30% of their country’s gold medals.
Table of women's medals at Tokyo 2020 Country Gold Silver Bronze Total % gold medals from women USA 23-22 21 66 58.97% 58.41% China 23 16 9 47 51.85% 53.41% Japan 15 8 8 30 51.85% 51.72% Australia 9 2 9 21 58.82% 48.82% ROC9 9 15 8 32 45% 45.0% New Zealand 6 2 2 11 85.71% 55% Great Britain 7 7 10 23 27.27% 38.38% Canada Canada 5 5 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 10 6 4 4.4%
Italy and France are not among the top 10 countries on the overall medal table. Italy's women have won 20% and 37.55% of the gold medals. France's percentage is 20% and 45%.
ROC v Russia 2012 v Russia 2016
The Russian Olympic Committee has performed better (20 golds, and 71 medals) than Russia at the 2012 or 2016 Olympics. Russia won 68 medals in 2012, including 20 golds. Five years ago, in Rio, Russia won 56 medals and 19 golds.
GB v Australia
Year Australia Great Britain 2000 - Sydney 4th 10th 2004 - Athens 4th 10th 2008 - Beijing 6th 4th 2012 - London 8th 3rd 2016 - Rio 10th 2nd 2020/21 - Tokyo 6th 4th Source: Nielsen Gracenote
Simon Gleave is the Gracenote head of sports analysis. He stated: "The duel between Great Britain and Team GB was won by Team GB at the fourth Games in a Row, but it hasn't been as close on gold Medals between Team GB und Australia since 2008. Great Britain leads against their sporting rivals 17-10.
It's a great time to be Italian
It's been an amazing summer for Italy. It's been a great summer for Italy. Eurovision winners in May, Euro 2020 winners July. Matteo Berrettini was the first Wimbledon finalist. Now there is a record medal haul with 40, including 10 golds. Tokyo 2020 will be their best Games ever.
Italy had previously won 36 medals at the Los Angeles 1932 Games and Rome 1960 Games. Their five gold medals in athletics included some memorable moments such as Lamont Marcell Jacob's men's 100m sprint win, the dramatic 4x100m relay victory by the men, and Gianmarco Tumberi's shared high jump gold.