Skip to main content

Classify Atlantic Hurricanes on the Saffir-Simpson Scale With JavaScript and HURDAT2

Updated 4 min readMarkdown

Hurricane categories 1 to 5 come from the Saffir-Simpson Hurricane Wind Scale, and the National Hurricane Center bases it on one number only, the maximum sustained wind. That makes it easy to compute. The NHC publishes HURDAT2, its best-track record of every Atlantic storm, as a plain text file, and a short script can rate each storm at its peak.

Bar chart of the Saffir-Simpson categories by wind with the major hurricane threshold marked

The scale rates hurricanes on wind alone, from Category 1 at 64 kt to Category 5 at 137 kt or more (NHC).

The Bands in Knots

The NHC sets intensities in 5-knot steps, so knots are the natural unit. Category 1 runs from 64 to 82 kt, Category 2 from 83 to 95, Category 3 from 96 to 112, Category 4 from 113 to 136 and Category 5 from 137 kt upward. Category 3 and above count as major hurricanes. The Category 4 band was widened by 1 mph at each end in 2012, and the NHC notes that no storm in the historical record changed category because of it.

The Script

HURDAT2 alternates header lines (an id such as AL092005, a name and a row count) with six-hourly track rows. In each track row the fourth field is the system status and the seventh is the maximum sustained wind in knots, with -999 for a missing value. The script keeps the highest wind recorded while a storm had hurricane status (HU), then applies the bands.

const url = "https://www.nhc.noaa.gov/data/hurdat/hurdat2-1851-2025-092326.txt";
const res = await fetch(url);
if (!res.ok) throw new Error(`NHC answered ${res.status}`);
const lines = (await res.text()).trim().split("\n");

// Saffir-Simpson bands in knots (NHC, 2012 revision)
function category(kt) {
  if (kt >= 137) return 5;
  if (kt >= 113) return 4;
  if (kt >= 96) return 3;
  if (kt >= 83) return 2;
  if (kt >= 64) return 1;
  return 0; // below hurricane strength
}

const storms = [];
let current = null;
for (const line of lines) {
  const f = line.split(",").map(s => s.trim());
  if (/^AL\d{6}$/.test(f[0])) {
    current = { id: f[0], name: f[1], year: Number(f[0].slice(4)), peak: 0 };
    storms.push(current);
  } else if (current) {
    const wind = f[3] === "HU" ? Number(f[6]) : 0; // only hurricane-status rows
    if (wind > current.peak) current.peak = wind;
  }
}

const recent = storms.filter(s => s.year >= 1950);
const counts = [0, 0, 0, 0, 0, 0];
for (const s of recent) counts[category(s.peak)]++;
console.log(`${recent.length} Atlantic storms from 1950 to 2025`);
for (let c = 1; c <= 5; c++) console.log(`Category ${c} at peak: ${counts[c]}`);
console.log(`Major hurricanes (Category 3+): ${counts[3] + counts[4] + counts[5]}`);

const cat5 = recent.filter(s => category(s.peak) === 5 && s.year >= 2000);
console.log("Category 5 since 2000:", cat5.map(s => `${s.name} ${s.year} (${s.peak} kt)`).join(", "));

Save it as sshws.mjs and run node sshws.mjs (Node 18 or later, for the built-in fetch). The file is about 7 MB and needs no key. Its name carries a revision date, so check the HURDAT2 folder for the newest one.

What It Prints

With the file revised in September 2026, the script finds 1,182 Atlantic systems from 1950 to 2025, depressions and tropical storms included. At their peak, 198 reached Category 1, 95 Category 2, 79 Category 3, 91 Category 4 and 35 Category 5, which gives 205 major hurricanes. Twenty-one storms reached Category 5 from 2000 on, from Isabel in 2003 to Melissa in 2025, whose 165 kt is the highest wind in the list.

What the Number Leaves Out

A category is a wind rating and nothing more. The NHC lists storm surge, rainfall flooding and tornadoes as potentially deadly hazards the scale does not take into account, so a Category 1 landfall can still bring a deep surge or days of rain. The peak computed here is also the strongest moment of the whole track, often far out at sea, not the strength at landfall.

The storms in the output carry names that rotate on six-year lists, and the worst of them are retired. Why Carla, Flora, Mitch and Nate will never be used again explains the retirement rule, and the 2027 Atlantic list from Ana to Wanda shows the names coming next. For the scale next to a mapped storm, Hurricane Katrina in 2005, see the Saffir-Simpson glossary entry on Live Atlas. Watches and warnings always come from the NHC and local authorities.

About the author

  • Exploring the planet through interactive maps, open insights, and visual storytelling.

No comments yet. Be the first to comment.