---
title: "Calculates LoRa packet time-on-air using the Semtech AN1200.13 formula. Computes symbol duration, preamble time, payload symbol count, effective data rate, and the minimum transmission interval for 1% duty cycle compliance. Essential for capacity planning in LoRaWAN and Meshtastic mesh networks. Accepts spreading factor (SF7-SF12), bandwidth (125/250/500 kHz), coding rate (4/5-4/8), payload size, header mode, CRC, and optional low data rate optimization. Feeds airtime_ms to channel_utilization for mesh load analysis."
method: POST
path: "/api/lora_airtime"
tags: ["mesh"]
---

# Calculates LoRa packet time-on-air using the Semtech AN1200.13 formula. Computes symbol duration, preamble time, payload symbol count, effective data rate, and the minimum transmission interval for 1% duty cycle compliance. Essential for capacity planning in LoRaWAN and Meshtastic mesh networks. Accepts spreading factor (SF7-SF12), bandwidth (125/250/500 kHz), coding rate (4/5-4/8), payload size, header mode, CRC, and optional low data rate optimization. Feeds airtime_ms to channel_utilization for mesh load analysis.

`POST /api/lora_airtime`

## Request

- Base URL: `https://calc.engineer`
- URL: `https://calc.engineer/api/lora_airtime`
- Auth: none declared

## Request body

- object
  - `sf` number: LoRa spreading factor (7-12). Higher SF = longer range but slower data rate.
  - `bw_khz` unknown
  - `cr` number: LoRa coding rate denominator (5-8). Represents 4/5 through 4/8 FEC ratio.
  - `payload_bytes` number, required: Application payload size in bytes (0-255).
  - `preamble_symbols` number: Number of preamble symbols. LoRaWAN uses 8; raw LoRa may vary.
  - `explicit_header` boolean: Whether to use explicit header mode. True for LoRaWAN; false for implicit header.
  - `crc` boolean: Whether CRC is appended to payload. Recommended true for reliability.
  - `low_data_rate_optimize` boolean: Enable low data rate optimization. Auto-calculated if omitted: enabled for SF >= 11 at BW 125 kHz.

## Response `200`

Computed result for lora_airtime

- object
  - `result` object, required
    - `airtime_ms` number, required: Total packet time-on-air in milliseconds.
    - `symbol_time_ms` number, required: Duration of a single LoRa symbol in milliseconds.
    - `preamble_time_ms` number, required: Preamble duration in milliseconds (includes 4.25 sync symbols).
    - `payload_symbols` number, required: Number of symbols used for the payload + header portion.
    - `data_rate_bps` number, required: Effective data rate in bits per second.
    - `duty_cycle_1pct_interval_s` number, required: Minimum interval between transmissions in seconds to respect 1% duty cycle regulation.
  - `tool` string, required
  - `version` string, required
  - `computed_at` string, date-time, required
  - `chain` object, required
    - `feeds` unknown[]
      - unknown
    - `accepts_from` unknown[]
      - unknown

## Other responses

- `400`: Validation error or invalid JSON
- `404`: Tool not found

---

[API](https://skmtc.dev/calc/apis/calc-engineer-api.md) · [All operations](https://skmtc.dev/calc/apis/calc-engineer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calc/apis/calc-engineer-api/revisions/8830480ec488?raw)
