Trade balances in 2017, the most recent annual snapshot
The figure for the European Union includes Germany, France, Italy and the United Kingdom, which are listed separately in the chart as well. Similarly, the figures for the Organization of Petroleum Exporting Countries (OPEC) includes Saudi Arabia, and Brazil is included in Central/South America.
Trade deficits and surpluses can shift over time
Many countries shift over time from having surpluses or deficits with the United States. Before we show you the whole world's U.S. trade picture since 1999, let's look at just two countries, Brazil and Canada, for example. In this chart the thickness of the colored shape represents the relative size of the trade balance with the United States and the position above or below the $0 line indicates whether the country has a surplus or deficit.
With Brazil, the United States had a slight trading surplus from 1999 to 2002, then went into a deficit with them until 2006 and has had surpluses ever since.
With Canada, the United States had a deficit, sometimes substantial, from 1999 up to 2014, when the trade balance crossed the $0 line and registered a surplus for the United States for 2015-2017. Canada is America's largest trading partner. In these charts you'll sometimes see a narrow little bridge when a country switches from deficit to surplus or vice versa. You can learn the amount of the deficit or surplus by clicking on the dots along the line.
The bigger picture: U.S. trade balance with the whole world
Here are the global figures for 19 countries or groups, again, in billions of dollars and with the same overlap mentioned above. That big pinch you see in the middle of the chart reflects the effects of the 2008 financial crisis on world trade in the following year.
And the whole world in a table
Here are the surplus and deficit figures for the chart above, in billions of dollars. You can scroll using the bar at the bottom to get to the years 2015-2017 (there are a lot of years here).