← All posts

STAYCHARTED BLOG · Machine learning · Freight class

Machine learning for NMFC codes and freight class: what it does, and what density still decides

Machine learning for NMFC codes: a model trained on your past bills of lading suggests the item for each product, while density sets the class. How it works.

By StayCharted ·

NMFC codes and freight class, briefly

Freight class tells LTL carriers how costly a shipment is to move. There are 18 classes, from 50 to 500, based on four factors: density, stowability, handling and liability. All else equal, a lower class generally costs less to ship per pound.

An NMFC item is the commodity entry the class comes from. You find the item that describes your product, and the item gives the class, either as a single class or, for density-based items, a scale of classes by pounds per cubic foot. The NMFC is published by the National Motor Freight Traffic Association (NMFTA), and the official lookup is its ClassIT+ subscription.

Getting it wrong costs money. When a carrier inspects a shipment and decides it belongs in a different class, it bills the difference and may add a reclassification or reweigh fee.

What changed in the NMFC in 2025

Docket 2025-1 took effect on 19 July 2025. NMFTA describes the main changes as follows:

  • Thousands of freight items were reclassified.
  • Many commodities moved from commodity-based classes to a single density-based scale, for freight with no special handling, stowability or liability concerns.
  • The density scale grew from 11 sub-provisions to 13, adding classes 50 and 55 for the densest freight.
  • Over 2,000 items moved to full-scale density-based classification, and many generic headings were consolidated.

Two things follow for anyone automating freight class. Weight and dimensions now matter more than ever, so accurate measurement is the first job. And item numbers your systems saved before July 2025 may be cancelled or consolidated, so a lookup table built before the change needs checking.

Source: NMFTA’s 2025 changes. Check the current item in ClassIT+ before using historical classifications.

Where AI freight classification helps

A shipper or 3PL usually has years of history: product descriptions next to the NMFC item and class that were actually used. That is labeled data, and a model trained on it learns how your team maps your own descriptions to items. Useful jobs for it:

  • New SKUs. Suggest the NMFC item for each new product in the catalog before the first shipment, so the item number is on the bill of lading from day one.
  • Messy descriptions. Supplier descriptions, abbreviations and part numbers vary. A model that reads meaning copes with different wording better than a keyword table.
  • Many shippers, one team. A 3PL or broker sees thousands of descriptions from different customers. A model trained on its own past decisions gives every coordinator the same first suggestion.
  • Checking what is already in the system. Run the model over existing SKU records and look at the rows where its answer differs from the saved item. Those are the records most worth a second look after the 2025 changes.

What it does not do: read a tape measure. The class for a density-based item still comes from the weight and dimensions of the actual handling unit, calculated against the item's density scale. A model can tell you the item is density-based; your scale and dimensioner give the class.

How accurate is machine learning for NMFC code lookup?

We have not benchmarked NMFC items. The NMFC is a subscription publication, and we do not have a public set of product descriptions labeled with NMFC items to test on, and we won't publish a number we haven't measured.

The closest task we have measured is HS code classification: a short product description in, one code out of thousands. In our HS code classification benchmark we trained on 5,621 U.S. Customs (CBP) rulings and tested on 1,167 later ones. The training rulings covered 2,014 different 10-digit codes, and 1,129 of those appeared only once.

StayChartedAI Model Trainer · model comparison
Share of 1,167 later rulings StayCharted AI Classifier Model Dedicated AI Model
Exact 10-digit code 22.2% 25.1%
Right heading (4 digits) 38.8% 54.0%
Right chapter (2 digits) 53.1% 74.0%

The AI Classifier Model was at 0.9 confidence or higher on 6.7% of the test rulings, and 96.2% of those were right to all 10 digits.

Read these as a hard case, not a forecast. Each model saw only a one-line ruling subject, and many codes had a single training example. A shipper's own NMFC history is usually more repetitive: the same products ship again and again, and descriptions come from one catalog. That should help, but the only way to know is to test on your own records, which AMT does before you use the model.

Confidence is what makes it usable

Alongside overall accuracy, check how many answers the model is sure of, and how often those sure answers are right. Every answer from StayCharted AI Model Trainer (AMT) comes with a confidence from 0 to 1, and the test report shows, for each cutoff, the share of answers above it and how many of those were right. You pick the cutoff. Your workflow can use answers above the cutoff to populate the bill of lading. On Essentials and Business, uncertain answers go to the Review Queue for a person to check in ClassIT+. Corrections become training examples when you retrain and publish the next version. Confidence does not guarantee a correct item. Read more on confidence scores and human review.

Machine learning compared with lookup tables and with a general AI

Approach Good at Weak at
SKU-to-item lookup table in your TMS or ERP Products you have shipped before, exactly as saved New SKUs, new wording, items cancelled in 2025
Asking a general AI chatbot Explaining freight class in general It has not learned your catalog, and the NMFC is a subscription publication that changed in 2025, so item numbers it recalls may be out of date
A model trained on your own bills of lading New descriptions that resemble your past ones, with a confidence on every answer Products unlike anything you've shipped, and the density calculation itself

Most teams end up using all three: the lookup table for known SKUs, a trained model for everything else, and a person with ClassIT+ for whatever the model is unsure of.

When you don't need machine learning

If you ship a few dozen products that rarely change, a lookup table maintained by one person is simpler and cheaper. Machine learning earns its place when new SKUs arrive every week, when descriptions come from many suppliers or customers, or when several people classify and give different answers for the same product.

How to start with an NMFC code model

  1. Export your history. One row per product or bill of lading line: the description, and the NMFC item your team used. Add the sub and class columns if you keep them. A few dozen examples per item is a reasonable start; see how many examples you need.
  2. Check the items against the 2025 changes. Rows filed under cancelled or consolidated items should be updated before training, or the model learns the old item.
  3. Train and read the test report. Start with the AI Classifier Model, with one included on Free, and look at accuracy per item and the confidence table before you use it.
  4. Fill new rows where they live. Fill a CSV or Excel export, use the Google Sheets add-on, call the API, or fill straight from a Snowflake or Databricks table.
  5. Keep measuring. Weigh and measure the handling unit, apply the density scale, and use the Review Queue for uncertain model answers on Essentials and Business.

Start free · See plans · How AMT works

Common questions

What is an NMFC code?

An NMFC code, or NMFC item number, identifies a commodity in the National Motor Freight Classification published by NMFTA. The item tells you the freight class for that commodity, either directly or through a density scale.

Is the NMFC code the same as freight class?

No. The NMFC item identifies what you are shipping; the freight class (50 to 500) is what the item assigns. Two different items can carry the same class, and a density-based item can give different classes depending on the shipment's density.

Can AI determine freight class?

Partly. A model trained on your past bills of lading can suggest the NMFC item from a product description. For density-based items, the class comes from the shipment's weight and dimensions, which have to be measured, not predicted.

How accurate is machine learning for NMFC codes?

We haven't benchmarked NMFC items, and do not have a public labeled dataset for that test. On the closest task we measured, HS codes from CBP rulings, the right chapter came back on 53.1% and 74.0% of later rulings for the two models, and the AI Classifier Model's answers at 0.9 confidence or higher were right 96.2% of the time. AMT tests a model on your own records before you use it.

What changed in the NMFC in 2025?

Docket 2025-1, effective 19 July 2025, moved many commodities to a density-based scale, expanded that scale to 13 sub-provisions with classes 50 and 55, moved over 2,000 items to full-scale density-based classification and consolidated many generic headings.

Do I still need ClassIT+ if I use a model?

Yes. ClassIT+ is the official NMFC. A model gives your team a fast first suggestion based on your own history; a person confirms anything it is unsure of in the official source.

How do I avoid LTL reclassification charges?

Use the current NMFC item, measure weight and dimensions accurately, and put both on the bill of lading. A trained model helps with the first part by suggesting the item consistently; the measurement is yours.

Sources and further reading

Put it into practice with StayCharted

Start free →

Check plans and allowances · Security and your data