How the work gets done

Duty Calculator

Computes the full duty stack — base rate, trade-program duties, and federal fees.

4 min readUpdated Jul 17, 2026

Deterministic service. Stacks every applicable duty program into one effective rate. Treasury-audit-grade: every component traces to a Federal Register citation.

What it does

Given a classified line (HTS code + value + origin), looks up every active duty program that applies and returns a breakdown: base HTSUS duty + Section 301 / 232 / IEEPA / Fentanyl / 201 / 301-style retaliatory tariffs

  • MPF + HMF, with the exact cents owed at each layer and the Federal Register notice cited per layer.

This is what produces the 159% effective rate you see on the cotton tees Simulation — $19,800 base + $9,000 Section 301 + $150,000 IEEPA China

  • $12,000 Fentanyl on $120K cargo.

No LLM here. The duty computation must be reproducible to the cent for a broker to file it on a CBP entry summary. A model would be both wrong (arithmetic is not its job) and unaudit-able.

Inputs

{
  htsCode: '6109.10.0027',          // 10-digit from the classifier
  valueCents: 12_000_000,           // declared FOB
  originCountry: 'CN',
  mode: 'ocean_fcl',                // affects HMF applicability
  entryType: 'formal' | 'informal', // affects MPF min/max
}

Outputs

{
  baseDutyCents: 1_980_000,         // 16.50% of $120K
  additionalDutyCents: 17_100_000,  // 301 + IEEPA + Fentanyl
  mpfCents: 41_568,                 // 0.3464%, capped at $634.82
  hmfCents: 15_000,                 // 0.125% (ocean only)
  totalDutyCents: 19_080_000,
  effectiveRatePct: 159,
  components: [
    {
      label: 'Base duty (6109.10.00.27 @ 16.50%)',
      source: 'base',
      rate: 0.165,
      valueCents: 1_980_000,
      citation: 'USITC HTSUS, live',
    },
    {
      label: 'Section 301 List 4A @ 7.50% (9903.88.15)',
      source: 'trade_program',
      program: 'Section 301',
      rate: 0.075,
      valueCents: 900_000,
      citation: 'USTR Notice 84 FR 43304; reduced to 7.5% via 85 FR 7129',
    },
    {
      label: 'IEEPA China @ 125.00% (9903.01.25)',
      source: 'trade_program',
      program: 'IEEPA China',
      rate: 1.25,
      valueCents: 15_000_000,
      citation: 'EO 14256 / 90 FR 15041 (50 USC 1701)',
    },
    {
      label: 'Fentanyl Tariff (EO 14195) @ 10.00% (9903.01.20)',
      source: 'trade_program',
      program: 'Fentanyl Tariff',
      rate: 0.10,
      valueCents: 1_200_000,
      citation: 'EO 14195 / 90 FR 9121',
    },
    {
      label: 'MPF',
      source: 'fee',
      valueCents: 41_568,
      citation: '19 CFR 24.23 — 0.3464% min $32.65 max $634.82',
    },
    {
      label: 'HMF',
      source: 'fee',
      valueCents: 15_000,
      citation: '19 CFR 24.24 — 0.125% ocean only',
    },
  ],
}

Duties vs. fees. totalDutyCents is duties only — the base HTSUS duty plus every trade-remedy layer (301 / 232 / IEEPA / Fentanyl / 201). MPF and HMF are separate line items, not folded into that total, because they are user fees rather than duties and each has its own statutory formula and caps. A broker's grand total for the entry is `totalDutyCents + mpfCents

  • hmfCents`; the drawer shows the duty subtotal, the two fees, and that grand total as distinct rows.

When it runs

  • After classification on every line, every entry — the drawer's "Duty & tariff" tab is wired to this.
  • In the Simulation pipeline — produces the stacked rate shown in the result panel.
  • In the Tariff intel screen — runs hypothetically when a broker asks "what would this entry cost under proposed rate change X".

Program coverage

Every active US trade-remedy program is stored as structured data — sourced from USTR notices, CBP guidance, and Presidential proclamations, each with its Chapter 99 code, origin scope, additional rate, covered HTS range, effective date, and source notice. Coverage today spans:

  • Section 301 Lists 1–4A (China)
  • Section 232 steel and aluminum
  • IEEPA actions (Russia, China)
  • Fentanyl Tariff (EO 14195)
  • Section 201 solar
  • UFLPA-presumption flags

Because programs are data, not code, a new tariff action is added by seeding a row — no code change — and it applies to matching entries immediately.

Dependencies

  • HTSUS table — for the base ad-valorem rate at the assigned 8-digit subheading.
  • MPF / HMF formulas — hard-coded per CFR (rates are statutory and don't change often; CFR-rate updates would happen via migration).

What success looks like

Computes the full duty-and-fee stack deterministically, to the cent, in the correct statutory order — base HTSUS duty first, then each trade-remedy program, then the MPF and HMF user fees with their caps. Because it's pure lookup-plus-arithmetic against the live tariff data, the same inputs always produce the same result, and every component traces to a Federal Register citation a broker can defend in a CBP audit.

What it does NOT do

  • Does not handle U.S. Note 20(b) exclusion granularity. Coverage is at the HTS-prefix level — if a specific code is excluded from Section 301 via USTR exclusion process, today we'd still apply 301. The AI evaluation surface tracks chapters with high exclusion-rate so the broker can spot-check. Roadmap item.
  • Does not apply specific (per-unit, per-kg) duty rates. Flagged for manual broker computation — we don't silently fake them.
  • Does not compute anti-dumping (AD) or countervailing (CVD) duties. Those require case-number lookup against CBP's ADCVD database. Q4 2026.
  • Does not check first-sale-for-export valuation, Generalized System of Preferences (GSP) eligibility, or NAFTA/USMCA certificate validity. All flagged but not auto-computed.
  • Does not include freight, insurance, broker fees, or bond cost. See How landed cost is calculated §"What's NOT in the simulation".

Roadmap

  • Q3 2026 — U.S. Note 20(b) exclusion granularity for Section 301 (so the 159% drops to ~34% for goods covered by active exclusions).
  • Q3 2026 — AD/CVD case-number lookup against CBP's database — fire an alert when an entry's HTS + origin matches an active case.
  • Q4 2026 — Section 232 quota state (TRQ filled vs available) — today we just apply the rate; we should warn when the country-specific TRQ is exhausted and the higher rate kicks in.
  • Q4 2026 — Section 232 derivative articles (the recent expansion to cover downstream steel/aluminum products).
  • Q1 2027 — GSP / USMCA / IPEF preference eligibility checks (today we don't apply preferences automatically; broker decides).
Ready to see it live?

Put your own book of entries through Commers.