{
  "id": "lightning-distance",
  "version": "0272d3bb0436",
  "status": "published",
  "name": "Lightning Distance Calculator",
  "question": "Lightning distance: how far away?",
  "summary": "Lightning distance calculator: how far away a lightning strike was from the seconds between the flash and the thunder, using the speed of sound at the air temperature and the 5-seconds-a-mile rule.",
  "category": "physics",
  "subcategory": "weather",
  "url": "https://www.acalculator.org/physics/lightning-distance-calculator",
  "markdown": "https://www.acalculator.org/physics/lightning-distance-calculator.md",
  "kind": "function",
  "method": "distance = v × t, with v = 331 m/s × √(1 + T_C ÷ 273) the speed of sound at air temperature T_C (°C) and t the seconds from flash to thunder; rule of thumb t ÷ 5 miles or t ÷ 3 km.",
  "assumptions": [
    "Light arrives at once, so the delay is the travel time of the sound. Wind and humidity are ignored.",
    "Thunder can be heard only about 10 miles away, but lightning can strike more than 10 miles from the storm (NWS, NOAA)."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "s": {
        "title": "Seconds from flash to thunder",
        "description": "The time between seeing the lightning and hearing its thunder, in seconds.",
        "type": "number",
        "minimum": 0,
        "maximum": 300
      },
      "t": {
        "title": "Air temperature",
        "description": "The outside air temperature, which sets the speed of sound.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "temperature",
        "minimum": 213.14999999999998,
        "maximum": 333.15
      }
    }
  },
  "outputs": {
    "distance": {
      "label": "Distance to the lightning",
      "description": "The speed of sound times the seconds from flash to thunder.",
      "format": "quantity",
      "unit": "mi"
    },
    "km": {
      "label": "Distance (km)",
      "description": "The same distance in kilometres.",
      "format": "number"
    },
    "feet": {
      "label": "Distance (ft)",
      "description": "The same distance in feet.",
      "format": "number"
    },
    "ruleMiles": {
      "label": "Rule of thumb (miles)",
      "description": "Seconds ÷ 5, the National Weather Service rule.",
      "format": "number"
    },
    "ruleKm": {
      "label": "Rule of thumb (km)",
      "description": "Seconds ÷ 3, the NOAA rule for kilometres.",
      "format": "number"
    },
    "speed": {
      "label": "Speed of sound (m/s)",
      "description": "331 × √(1 + T ÷ 273), with T in °C.",
      "format": "number"
    },
    "speedFt": {
      "label": "Speed of sound (ft/s)",
      "description": "The same speed in feet per second.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "s": 10,
      "t": 293.15
    },
    "outputs": {
      "distance": 3429.102606899462,
      "km": 3.429102606899462,
      "feet": 11250.336636809257,
      "ruleMiles": 2,
      "ruleKm": 3.3333333333333335,
      "speed": 342.9102606899462,
      "speedFt": 1125.0336636809259
    },
    "text": "The lightning was about 2.13 mi away (seconds ÷ 5 gives 2 miles)."
  },
  "examples": [
    {
      "given": {
        "s": 5,
        "t": 293.15
      },
      "expect": {
        "ruleMiles": 1,
        "speed": 342.9102606899462,
        "distance": 1714.551303449731,
        "km": 1.714551303449731
      },
      "source": "National Weather Service, Understanding Lightning: Thunder (count the seconds from flash to thunder and divide by 5 for miles: 5 seconds = 1 mile, 15 seconds = 3 miles), https://www.weather.gov/safety/lightning-science-thunder (retrieved 2026-10-18); OpenStax, University Physics Volume 1, §17.2 Speed of Sound (Equation 17.7, v = 331 m/s × √(1 + T_C ÷ 273 °C); 343 m/s at 20.0 °C; Example 17.1: 348.7 m/s at 30.0 °C), https://openstax.org/books/university-physics-volume-1/pages/17-2-speed-of-sound (retrieved 2026-10-18); hand calculation in content.mdx: 331 × √(1 + 20/273) × 5 = 1,714.5 m = 1.07 miles",
      "tolerance": 1e-12
    },
    {
      "given": {
        "s": 15,
        "t": 293.15
      },
      "expect": {
        "ruleMiles": 3,
        "ruleKm": 5,
        "distance": 5143.653910349193
      },
      "source": "National Weather Service, Understanding Lightning: Thunder (count the seconds from flash to thunder and divide by 5 for miles: 5 seconds = 1 mile, 15 seconds = 3 miles), https://www.weather.gov/safety/lightning-science-thunder (retrieved 2026-10-18); NOAA JetStream, Lightning Safety (divide by 3 for kilometres: 15 seconds is 3 miles, 5 km), https://www.noaa.gov/jetstream/lightning/lightning-safety (retrieved 2026-10-18); OpenStax, University Physics Volume 1, §17.2 Speed of Sound (Equation 17.7, v = 331 m/s × √(1 + T_C ÷ 273 °C); 343 m/s at 20.0 °C; Example 17.1: 348.7 m/s at 30.0 °C), https://openstax.org/books/university-physics-volume-1/pages/17-2-speed-of-sound (retrieved 2026-10-18); hand calculation in content.mdx: 342.91 × 15 = 5,143.6 m = 3.20 miles",
      "tolerance": 1e-12
    },
    {
      "given": {
        "s": 10,
        "t": 303.15
      },
      "expect": {
        "speed": 348.7128766330121,
        "distance": 3487.128766330121
      },
      "source": "OpenStax, University Physics Volume 1, §17.2 Speed of Sound (Equation 17.7, v = 331 m/s × √(1 + T_C ÷ 273 °C); 343 m/s at 20.0 °C; Example 17.1: 348.7 m/s at 30.0 °C), https://openstax.org/books/university-physics-volume-1/pages/17-2-speed-of-sound (retrieved 2026-10-18) (Example 17.1: (331 m/s)√(303/273) = 348.7 m/s); hand calculation in content.mdx: × 10 s = 3,487.1 m",
      "tolerance": 1e-12
    },
    {
      "given": {
        "s": 10,
        "t": 273.15
      },
      "expect": {
        "speed": 331,
        "distance": 3310,
        "feet": 10859.580052493438
      },
      "source": "OpenStax, University Physics Volume 1, §17.2 Speed of Sound (Equation 17.7, v = 331 m/s × √(1 + T_C ÷ 273 °C); 343 m/s at 20.0 °C; Example 17.1: 348.7 m/s at 30.0 °C), https://openstax.org/books/university-physics-volume-1/pages/17-2-speed-of-sound (retrieved 2026-10-18): v = 331 m/s at 0 °C; hand calculation in content.mdx: 331 × 10 = 3,310 m",
      "tolerance": 1e-12
    },
    {
      "given": {
        "s": 0,
        "t": 293.15
      },
      "expect": {
        "distance": 0,
        "ruleMiles": 0
      },
      "source": "National Weather Service, Understanding Lightning: Thunder (count the seconds from flash to thunder and divide by 5 for miles: 5 seconds = 1 mile, 15 seconds = 3 miles), https://www.weather.gov/safety/lightning-science-thunder (retrieved 2026-10-18) (0 seconds = very close)"
    }
  ],
  "sources": [
    "National Weather Service, Understanding Lightning: Thunder: count the seconds between the flash and the thunder and divide by 5 for miles (5 seconds = 1 mile, 15 seconds = 3 miles, 0 seconds = very close); thunder can be heard about 10 miles away, retrieved 2026-10-18. https://www.weather.gov/safety/lightning-science-thunder",
    "NOAA JetStream, Lightning Safety: divide by 3 for kilometres (15 seconds is 3 miles, 5 km); lightning can strike more than 10 miles from the rainfall; stay indoors until 30 minutes after the last thunder, retrieved 2026-10-18. https://www.noaa.gov/jetstream/lightning/lightning-safety",
    "National Weather Service, Lightning Safety: when thunder roars, go indoors; if you hear thunder you are likely within striking distance, retrieved 2026-10-18. https://www.weather.gov/safety/lightning-safety",
    "OpenStax, University Physics Volume 1, §17.2 Speed of Sound: Equation 17.7, v = 331 m/s × √(1 + T_C ÷ 273 °C); 343 m/s at 20.0 °C; Example 17.1, retrieved 2026-10-18. https://openstax.org/books/university-physics-volume-1/pages/17-2-speed-of-sound",
    "NIST Special Publication 811 (2008), Appendix B.8: 1 ft = 0.3048 m, 1 mi = 1,609.344 m, retrieved 2026-10-18. https://www.nist.gov/pml/special-publication-811"
  ],
  "related": [
    "speed",
    "wavelength",
    "heat-index"
  ],
  "changelog": []
}
