A country has a trade surplus when it exports more than it imports. Conversely, a country has a trade deficit when it imports more than it exports. A country can have an overall trade deficit or surplus, or simply have either with a specific country. Either situation presents problems at high levels over long periods of time, but a surplus is generally a positive development, while a deficit is seen as negative. Economists recognize that trade imbalances of either sort are common and necessary in international trade.
When a country's goods are in demand, firms throughout the country sell both to internal markets and export to foreign markets. Firms based in other countries import those goods by selling their currency on currency markets for the currency of the company that produces the goods. Firms then use that currency to purchase goods in demand, bring the goods into their country, sell for a price in the local currency and repeat the process.
Economists and government bureaus attempt to track trade deficits and surpluses by recording as many transactions with foreign entities as possible. Economists and statisticians collect receipts from customs offices and routinely total imports, exports and financial transactions. The full accounting is called the balance of payments — this is used to calculate the balance of trade, which almost always results in a trade surplus or deficit.
For the country exporting goods in demand, its companies receive increasing numbers of foreign orders. These companies also either receive and accumulate foreign currency that foreign firms use to purchase goods, or financial institutions receive foreign currency and see a rising demand for the exporting country's currency, causing its price on international markets to rise. All of these aspects of a trade surplus allow the government, financial institutions and exporting companies in the country to acquire wealth.
A country whose firms import more foreign goods than the domestic goods they export has a trade deficit. Firms receive local currency from the sale of foreign goods and trade that currency to buy more foreign goods. The local currency may fall in price relative to the currencies of countries producing products in demand, and much of the money the population spends on foreign goods ends up in the income statements and bank accounts of foreign companies, effectively sending national wealth to other countries.