Trade data methodology and sources
The sources, definitions and editorial checks behind the merchandise trade figures.
Every trade figure on the site comes from two public sources: the World Bank’s World Development Indicators, which publishes merchandise trade figures sourced from the WTO, and UN Comtrade. The source values are stored as dated snapshots. The prose is generated from those values, and an automated check runs before publication to validate the figures and claims in the text.
Data sources
The World Bank’s World Development Indicators provides the annual series used for country totals and trends. The two indicators are ‘Merchandise exports (current US$)’ and ‘Merchandise imports (current US$)’. Both are compiled by the World Trade Organization (WTO), and the series used here run from 2015 to 2025. The UN Comtrade public preview API provides annual trade values by partner and by HS chapter, as reported by each country. The latest available year for that detail varies by reporter; the years used are 2023 and 2024. Country names come from the Unicode Common Locale Data Repository (CLDR).
- World Bank, World Development Indicators — Merchandise exports (current US$) (source: WTO)
- World Bank, World Development Indicators — Merchandise imports (current US$) (source: WTO)
- UN Comtrade public preview API (United Nations Statistics Division)
- UN Comtrade reference files (reporters, partner areas, HS)
- World Bank data licence (CC BY)
- UN Comtrade policy on data use
- Unicode CLDR country and territory names
Attribution and terms of use
‘UN Comtrade’ and ‘World Bank, World Development Indicators’ are cited on every page. World Bank data are published under a Creative Commons Attribution licence. UN Comtrade data are used under its terms of use.
What the trade figures measure
Merchandise trade covers goods only. It does not include services. Exports are goods sent out of the reporting economy, and imports are goods brought into it. Total trade is the value of exports plus the value of imports. The trade balance is the value of exports minus the value of imports, so it measures the difference between the two flows rather than their combined value. Nominal US$ means current US dollars: the figures are not adjusted for inflation.
Glossary
- FOB: Free on board, a valuation at the exporting border that excludes freight and insurance beyond that point.
- CIF: Cost, insurance and freight, a valuation that includes insurance and freight to the importing border.
- Reporter: The country that submits the trade figures.
- Partner: The country recorded as the counterpart in the reporter’s trade figures.
- Mirror data: A partner’s report of the same trade flow from the opposite side, such as its reported exports compared with the reporter’s imports.
- HS: The Harmonized System for classifying goods; H6 is the UN Comtrade code for the HS 2022 edition.
- HS chapter: A broad grouping of goods at the 2-digit level.
- Heading: A grouping within an HS chapter at the 4-digit level.
- Subheading: A grouping within an HS heading at the 6-digit level.
- Re-exports: Exports of previously imported goods that have not been substantially transformed.
Why trade figures can differ
World Bank figures compiled by the WTO and UN Comtrade figures for the same country and year need not match. The sources can use different compilation concepts or incorporate revisions at different times. General and special trade systems differ in what they count, including how they treat goods moving through free zones. The treatment of re-exports can also vary. Valuation matters when imports are recorded on a CIF rather than an FOB basis, and the sources may release data at different times. A country’s reported imports can also differ from the exports its partners report to that country. These mirror asymmetries can arise from differences in valuation, timing or partner recording. Country pages show figures from both sources and flag large gaps without assigning a cause.
How derived measures are calculated
- Partner share: Divide the trade value for the partner by the reporter’s total for the same trade flow and year. Express the result as a percentage.
- Change since the first year: Subtract the first year’s value from the latest value, divide by the first year’s value and express the result as a percentage.
- Year-over-year change: Subtract the previous year’s value from the current year’s value, divide by the previous year’s value and express the result as a percentage.
- Trade balance: Subtract the value of merchandise imports from the value of merchandise exports for the same period.
- Share of world trade in the rankings: Divide the country’s value by the world total for the same trade flow and year. Express the result as a percentage.
- Top-three concentration: Add the trade values for the top three partners, divide by the reporter’s total for the same flow and year, and express the result as a percentage.
- Trade as a share of GDP: Add merchandise exports and imports, divide by GDP for the same year and express the result as a percentage.
How numbers are displayed
Charts and text show large dollar values in compact form. English and Spanish use their own scale labels rather than literal translations. Tables show exact dollar values. Shares and changes are displayed to one decimal place. When a value falls exactly between two display values, its magnitude rounds up. Spanish pages use a decimal point and commas to separate groups of digits, a convention used in Central America. The decimal comma is another convention used in Spanish, including in the Southern Cone.
Country coverage
Coverage is limited to a fixed set of 42 countries. The editorial groupings are Latin America, North America, Europe, Asia, the Middle East and Africa, and Oceania. A country is included only when the sources provide complete data by both partner and HS chapter. The UN Comtrade year used for those details is 2024 for 40 countries and 2023 for 2. The country index lists the countries by group.
Dates and updates
Each page shows three dates: the data period, the date the data were retrieved and the date the page was updated. The data period tells you what time the figures cover. The retrieval date tells you when the source snapshot was taken, not when the trade occurred. The page-updated date changes only when the page content changes. Pages are refreshed when the sources publish new data, with no fixed update schedule.
Drafting, validation and review
Text is drafted with AI assistance using the data snapshot for each page. An automated validator checks that every number in the draft comes from that snapshot and blocks claims that the data do not support. The editorial team reviews pages before publication. The English and Spanish versions use the same source data, but the Spanish copy is written separately rather than translated from the English.
Corrections
Readers can report an error to the yTrade data team. Corrections are made on the affected page, and the page-updated date is changed to show when the correction was made.
About the publisher
The site is published by the yTrade data team. The team is credited under an organisation byline, so the byline identifies the publisher rather than naming individual authors. The publisher’s credit is separate from the citations for the trade data. The product description follows below.
Frequently asked questions
- Why do the World Bank and UN Comtrade figures differ?
- The figures can differ when the sources apply different compilation methods or incorporate revisions at different times. Trade system coverage, the treatment of re-exports and free zones, and import valuation can also affect the comparison. A flag identifies a large gap without attributing it to any particular factor.
- Why do some years differ between sections?
- Different sections use the latest available data for the series they show. The World Bank series is used for country totals and trends, while UN Comtrade supplies partner and chapter detail. The latest year for that detail can also vary by reporting country.
- Are the trade values adjusted for inflation?
- No. The trade values are nominal, meaning they are expressed in current US dollars. A comparison across years shows the change in the reported dollar value without removing the effect of changes in prices.