How the work gets done

Duty Calculator

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

4 min readUpdated Aug 6, 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 / 201 trade-remedy tariffs + MPF + HMF, with the exact cents owed at each layer and the Federal Register notice cited per layer.

A $200,000 line of Chinese steel stacks 0% base HTSUS + 25% Section 301 + 25% Section 232 (steel) = a 50% effective rate ($100,000 in duties) — all under laws in force today.

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: '7208.39.0000',          // 10-digit from the classifier
  countryOfOrigin: 'CN',            // ISO-2
  valueCents: 20_000_000,           // declared FOB ($200,000)
  mode: 'ocean',                    // 'ocean' | 'air' | 'truck' | 'rail' | 'mail' | 'other'; HMF applies to ocean only
  // No entryType flag — the informal-entry MPF (flat $2.62) is derived
  // automatically when total cargo value is under the $2,500 threshold.
}

Outputs

{
  baseDutyCents: 0,                 // 0% base on flat-rolled steel
  additionalDutyCents: 10_000_000,  // Section 301 + Section 232 (steel)
  mpfCents: 63_482,                 // 0.3464% of $200K, capped at $634.82
  hmfCents: 25_000,                 // 0.125% of $200K (ocean only)
  totalDutyCents: 10_000_000,
  effectiveRatePct: 50,
  components: [
    {
      label: 'Base duty (7208.39.00.00 @ 0.00%)',
      source: 'base',
      rate: 0,
      valueCents: 0,
      citation: 'USITC HTSUS, live',
    },
    {
      label: 'Section 301 List 3 @ 25.00% (9903.88.03)',
      source: 'trade_program',
      program: 'Section 301 List 3',
      rate: 0.25,
      valueCents: 5_000_000,
      citation: 'USTR Notice 83 FR 47974 (initial 10%); raised to 25% via 84 FR 20459',
    },
    {
      label: 'Section 232 Steel @ 25.00% (9903.80.01)',
      source: 'trade_program',
      program: 'Section 232 Steel',
      rate: 0.25,
      valueCents: 5_000_000,
      citation: 'Presidential Proclamation 9705 / 83 FR 11625',
    },
    {
      label: 'MPF',
      source: 'fee',
      valueCents: 63_482,
      citation: '19 CFR 24.23 — 0.3464% min $32.65 max $634.82',
    },
    {
      label: 'HMF',
      source: 'fee',
      valueCents: 25_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 / 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 (Russia)
  • Section 201 solar
  • UFLPA-presumption flags

Historical, no longer applied: IEEPA China (the "reciprocal" tariff, which peaked at 125%) and the Fentanyl tariff (EO 14195) were vacated by the Supreme Court in Learning Resources, Inc. v. Trump; CBP halted collection for entries on/after 2026-02-24. Both remain in tariff_actions with an expiry date so a historical entry still decomposes under the regime in force at its date of importation — but they are not applied to current entries.

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 steel example's 50% drops to 25% — Section 232 only — for goods covered by an active Section 301 exclusion).
  • 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 Aduaria.