Explainer · Kresmion Research
What Is an HS Code? How Goods Are Classified in Trade Data
Published by Kresmion Research. Read our editorial approach and data methodology.
See it liveLive central bank policy rates →Free, no account needed.
An HS code is the World Customs Organization's six-digit number for a traded good, the shared product classification behind customs tariffs and trade data.
Customs paperwork gives a shipment a number instead of a name, and that number is its HS code. This page covers what the six digits mean, where national codes take over, how the system changes between editions, and why bilateral trade datasets stop at six digits. It is descriptive throughout.
What the six digits mean
The Harmonized System (HS), formally the Harmonized Commodity Description and Coding System, is the product nomenclature maintained by the World Customs Organization (WCO). It covers more than 5,000 commodity groups, each with a six digit code, and more than 200 countries and economies use it for their customs tariffs and their trade statistics. The WCO puts the share of merchandise in international trade classified in HS terms at over 98 percent. It rests on an international convention, so those six digits mean the same thing in every country that signed it.
The code widens from a broad category to a specific product, read left to right. Take 854231:
- 85 is the chapter: electrical machinery.
- 8542 is the heading: electronic integrated circuits.
- 854231 is the subheading: processors and controllers.
Where the national digits begin
Harmonization stops at six. Below that, each customs territory adds digits of its own for tariff and statistical purposes.
The United States uses ten: imports on the Harmonized Tariff Schedule administered by the US International Trade Commission, exports on Schedule B administered by the Census Bureau. The first six digits of a US number are the HS subheading and match the first six used anywhere else. The European Union uses eight. A Combined Nomenclature code takes the HS chapter, heading and subheading and adds two EU-specific digits, so cocoa powder containing added sugar sits at HS subheading 1806 10 and at CN subheading 1806 10 15 when it holds less than 5 percent sucrose by weight, counting invert sugar and isoglucose expressed as sucrose.
Only the first six digits travel between systems, so a US ten-digit line and an EU eight-digit line cannot be matched directly.
Editions, and why two files may not line up
The WCO revises the HS every five to six years, so a code is only fully defined once you know its edition. HS 2022, effective 1 January 2022, is the seventh edition, and complementary amendments took effect on 1 January 2023 and 1 January 2024. The eighth edition, HS 2028, enters into force on 1 January 2028, and the WCO has already published the tables correlating it with HS 2022.
A revision splits subheadings that grew too broad, merges ones that shrank, and creates lines for goods that did not exist before, so a code can change meaning or stop existing between editions. The WCO publishes correlation tables between HS 2017 and HS 2022 for that reason. A series built on one edition is not comparable with one built on another until it has been mapped through that concordance, which is why a dataset states its edition.
Why bilateral trade data stops at six digits
Cross-country comparison is only possible at the harmonized level, so bilateral datasets are published at six digits. Before a dataset can publish those six digits, it has to reconcile two reports of the same flow.
Every flow is reported twice: country i reports an export to country j, and j reports an import from i. The two should match and virtually never do, for two reasons CEPII sets out. Import values are reported CIF (cost, insurance and freight) while export values are reported FOB (free on board), and mistakes happen, from uncertainty about a shipment's final destination to disagreement over how a product is classified.
CEPII's BACI database, built on United Nations Comtrade reports, produces one reconciled value per flow: it estimates and removes the CIF costs from import values, then weights each country by how reliable a reporter it has been. The output is one value per exporter, importer, six-digit product and year, in thousands of US dollars, FOB.
A worked example: 33.9 million rows of bilateral flows
Kresmion's trade map, a signed-in page, renders country-to-country goods flows by HS6 product, by HS4 or HS2 rollup, or by curated theme, with ranked partner and product panels on annual data.
The file behind it is CEPII BACI, HS 2022 edition, vintage V202601 (released January 2026), covering 2022, 2023 and 2024. As loaded on 2026-09-13 it holds 11,007,862 rows for 2022, 11,641,922 for 2023 and 11,250,411 for 2024: 33,900,195 exporter-importer-product-year rows. World goods trade in it is about $24.2 trillion for 2022, about $23.0 trillion for 2023 and about $22.9 trillion for 2024, across 235 countries and territories and 5,609 HS6 lines in BACI's own product file.
The product side of a row looks like this:
| HS6 | Description in the file | Theme |
|---|---|---|
| 270900 | Oils: petroleum oils and oils obtained from bituminous minerals, crude | fossil energy |
| 300490 | Medicaments, mixed or unmixed, for therapeutic or prophylactic uses, packaged for retail sale | pharma |
| 851713 | Telephone sets: smartphones for cellular or other wireless networks | electronics |
| 854231 | Electronic integrated circuits: processors and controllers | semiconductors |
| 870323 | Vehicles with spark-ignition engine, cylinder capacity over 1500cc but not over 3000cc | autos |
Analysts group the 5,609 lines into material families. The curation carries 21 of them, covering 5,198 of the 5,609 lines, 92.7 percent. Shortened to a word or two, their line counts run: agri-food 963, textiles 913, chemicals 830, metals 561, machinery 511, electronics 374, wood and paper 286, plastics and rubber 209, autos 98, critical minerals 74, precious 55, furniture 52, ships 48, pharma 45, fossil energy 39, medical 36, fertilizers 26, aerospace 26, semiconductors 24, arms 18, energy transition 10.
Reporting entities follow BACI's list, so Taiwan appears in the source data as "Other Asia, nes", code 490. The load files that entity under Taiwan so a reader can find it by name, and BACI's own label sits beside it here.
What an HS code does not tell you
The HS classifies goods. Services carry no HS code, so software exports and tourism receipts sit outside any HS6 dataset.
Values are customs declarations rather than observed transactions. Classification is a legal determination and it is contested: importers and customs authorities disagree over which subheading a good falls in, and misclassification moves value between lines. A code says what a good is, not where its value was added; origin is settled by a separate body of rules.
Theme rollups are a layer added on top of the standard: 21 themes cover 5,198 lines and leave 411 outside them (5,609 minus 5,198). Annual customs value also answers a different question from a weekly physical count, such as the crude and product stocks in how to read EIA weekly inventory data. Other data explainers sit in the learn library.
Key takeaways
| Term | What it means |
|---|---|
| Harmonized System (HS) | The WCO nomenclature: more than 5,000 commodity groups, used by more than 200 countries and economies. |
| HS6 | The subheading: chapter (2 digits), heading (4), subheading (6). The finest level that means the same worldwide. |
| HS8 and HS10 | National extensions: the EU Combined Nomenclature runs to 8 digits, the US tariff schedule and Schedule B to 10. |
| Edition | HS 2022 is the seventh edition, effective 1 January 2022. Codes change between editions, so a dataset names its own. |
| Mirror flows | Each flow is reported twice, CIF by the importer and FOB by the exporter. BACI reconciles the pair into one value. |
| Theme rollup | A curatorial grouping of HS6 lines: 21 themes cover 5,198 of 5,609 lines, 92.7 percent. |
Frequently asked questions
What is the difference between HS6, HS8 and HS10?
HS6 is the six-digit subheading, the deepest level harmonized across countries under the WCO convention. HS8 and HS10 are national extensions: the EU Combined Nomenclature adds two digits, and the United States adds four for its tariff schedule and its Schedule B. Because the first six agree everywhere, cross-country analysis happens at six digits and tariff work happens deeper.
Why do two countries report different values for the same trade flow?
Because they measure it differently and both make errors. Import values are reported CIF, including cost, insurance and freight, while export values are reported FOB, so the importer's figure carries shipping costs the exporter's does not. BACI produces one reconciled figure by removing the estimated CIF costs and weighting each country by its record as a reporter.
Can trade data from different HS editions be compared directly?
Not without a concordance. The WCO revises the system every five to six years, splitting, merging and creating subheadings, so a code can change meaning or disappear between editions. It publishes correlation tables, such as the tables between HS 2017 and HS 2022 and between HS 2022 and HS 2028, for mapping one edition onto the other.
Does an HS code tell you what tariff a shipment pays?
Not on its own. The six digits identify the product, but duty rates attach at the national line, eight or ten digits deep, and every customs territory sets its own rates, quotas and preferences. The same HS6 subheading can carry different treatment in different countries and trade agreements.
Does an HS code predict anything about prices or trade flows?
No. It describes; it does not forecast. An HS code labels what a good is, and a row of HS6 trade data records what one country declared it sold to another in a year that has closed. This page is information, not investment advice.
--- Source: CEPII BACI, HS 2022 edition, vintage V202601 released January 2026, years 2022 to 2024, Etalab Open Licence 2.0, https://www.cepii.fr/CEPII/en/bdd_modele/bdd_modele_item.asp?id=37 , built on UN Comtrade https://comtradeplus.un.org/ , counts as loaded by Kresmion on 2026-09-13; WCO, https://www.wcoomd.org/en/topics/nomenclature/overview/what-is-the-harmonized-system.aspx , https://www.wcoomd.org/en/topics/nomenclature/instrument-and-tools/hs-nomenclature-2022-edition.aspx and https://www.wcoomd.org/en/topics/nomenclature/instrument-and-tools/hs-nomenclature-2028-edition.aspx ; US International Trade Administration, https://www.trade.gov/harmonized-system-hs-codes ; European Commission Taxation and Customs Union, https://taxation-customs.ec.europa.eu/customs-4/calculation-customs-duties/customs-tariff/combined-nomenclature_en ; all seven URLs retrieved 2026-09-14. Kresmion Research.
- · CEPII BACI, HS 2022 edition, vintage V202601 (Etalab Open Licence 2.0), years 2022-2024 as loaded by Kresmion 2026-09-13
- · World Customs Organization, Harmonized System nomenclature
Every tracked central bank's policy rate, its latest change and the primary source behind it.
Free to view, no account needed.
Put this to work
Real filings, 13F flows, and positioning reads with the source on every number, in your inbox when there is something in the data, or live on Telegram. Free, no account.
No fixed schedule: it goes out when the data has something in it. Unsubscribe anytime.
Kresmion publishes information, not investment advice. See our methodology and the latest research notes.