Lora Bitrate Calculator: How to Estimate LoRa Data Rate
- Time on air
- s
- Result
- Spreading factor
- 7
- You entered
- Bandwidth (kHz)
- 125 kHz
- You entered
This calculator estimates the over-the-air bitrate of a LoRa link from the spreading factor, bandwidth, and coding rate you plan to use. Enter those three settings and it returns the raw bitrate in bits per second, plus the time on air for a single packet of a given size. The result helps you compare configurations before you commit to firmware settings.
Formula
The raw LoRa bitrate is calculated as:
Bitrate (bps) = SF × (4 / (4 + CR)) × (BW / 2^SF)
Where:
- SF – spreading factor (7 to 12), a unitless integer that controls how many chirps encode each symbol.
- CR – coding rate denominator offset (1 to 4). The actual coding rate is 4/(4+CR), so CR=1 gives 4/5, CR=4 gives 4/8.
- BW – bandwidth in hertz (convert kHz to Hz by multiplying by 1000). Common values: 125 kHz, 250 kHz, 500 kHz.
The formula comes from the LoRa modulation definition in the SX1272/SX1276 datasheets. It gives the raw PHY bitrate before protocol overhead (preamble, headers, CRC). The time-on-air estimate uses a simplified payload model: it assumes an explicit header, no low-data-rate optimization, and a 12.5-symbol preamble. Real LoRaWAN packets include additional fields, but this approximation is close for typical payloads.
Worked Example
Using the defaults from the calculator (SF=7, BW=125 kHz, CR=1, payload=20 bytes):
- Convert bandwidth: 125 kHz = 125,000 Hz.
- Compute the symbol rate: BW / 2^SF = 125,000 / 128 = 976.5625 symbols per second.
- Compute the coding overhead factor: 4 / (4+1) = 4/5 = 0.8.
- Multiply: 7 × 0.8 × 976.5625 = 5,468.75 bps, which rounds to 5,469 bps.
- For time on air, estimate the number of bits: 8×20 + 16 + 4×7 – 20 + 8 = 160 + 16 + 28 – 20 + 8 = 192 bits. Divide by bitrate: 192 / 5468.75 = 0.0351 s (about 35 ms).
The calculator shows 5,469 bps and 0.04 s (rounded to 2 decimals). The small difference is due to rounding in the time display.
How to Choose Settings
LoRa is all about trade-offs. Lower spreading factors (SF7) give higher bitrates but shorter range and less noise immunity. Higher spreading factors (SF12) roughly halve the bitrate for each step up but add about 2.5 dB of sensitivity gain per SF step, extending range significantly. Bandwidth also matters: doubling bandwidth doubles the bitrate but reduces sensitivity by about 3 dB and uses more spectrum. Coding rate adds redundancy: a higher CR (4/8) improves resilience to interference but reduces throughput by up to 50%.
For most applications, start with SF7 and 125 kHz, then increase SF only if you need more range. Use 250 kHz or 500 kHz when you need higher throughput and have regulatory headroom (check local ISM band rules). Keep the coding rate at 1 (4/5) unless you are in a noisy environment; then try 2 or 3.
Common Mistakes and Misconceptions
- Confusing bitrate with throughput: The raw bitrate is not the application data rate. LoRaWAN adds headers, MAC commands, and requires gaps between uplinks. Real usable throughput is often 30–50% of the raw bitrate.
- Using kHz as Hz: Always multiply kHz by 1000. Forgetting this leads to bitrates that are 1000× too low.
- Mixing up coding rate notation: Some datasheets list the coding rate as 4/5, 4/6, 4/7, 4/8. The calculator uses the offset (1 to 4) that appears in the register. If you see “CR=4/5”, enter 1.
- Ignoring the preamble: The time-on-air estimate includes a 12.5-symbol preamble, but if you change the preamble length in your device, adjust the calculation manually.
- Assuming all SF values work with all bandwidths: Some combinations (like SF12 with 500 kHz) are not allowed in certain regions or by certain chips. Check your device’s datasheet.
Practical Use Cases
Use this calculator when planning a sensor network. For example, a temperature sensor sending 20 bytes every 10 minutes with SF7, 125 kHz, CR=1 will occupy the air for about 35 ms per packet, leaving plenty of room for other devices. If you need to send 100 bytes at SF10, the time on air jumps to roughly 300 ms, which limits how many devices can share the channel without collisions.
For battery life, higher SF and longer time on air consume more energy per packet, but they may reduce retransmissions. A good practice is to calculate the time on air for your worst-case payload and compare it to your duty-cycle limits (often 1% in sub-GHz bands).
Limitations of the Formula
This formula gives the theoretical PHY bitrate. It does not account for:
- Protocol overhead (LoRaWAN MAC header, MIC, frame counters).
- Adaptive data rate (ADR) adjustments made by the network server.
- Interference and retransmissions.
- Low-data-rate optimization, which adds a header when symbol time is long.
- Regulatory restrictions on bandwidth and duty cycle.
For precise network planning, use a LoRaWAN simulator or the official link budget calculators provided by regional LoRaWAN operators.
Frequently Asked Questions
What is the difference between bitrate and data rate in LoRa?
Bitrate is the raw number of bits transmitted per second over the air. Data rate (or throughput) is the actual application payload bits per second after subtracting headers, CRC, and protocol overhead. In LoRaWAN, the data rate is often 10–20% of the raw bitrate.
Can I use this calculator for LoRaWAN?
Yes, but only for the PHY layer. LoRaWAN adds a MAC header (13 bytes for confirmed messages) and uses a specific preamble (8 symbols). The time on air will be slightly longer than the calculator shows. For a quick estimate, add 13 bytes to your payload length.
Why does the bitrate drop so much when I increase the spreading factor?
Because the symbol rate is BW/2^SF. Each SF step doubles the number of chips per symbol, so the symbol rate halves. Since each symbol still carries SF bits, the bitrate is SF × symbol_rate, which decreases by roughly half each time you increase SF.
What is the maximum bitrate LoRa can achieve?
With SF7 and 500 kHz bandwidth, the raw bitrate is about 21,875 bps (using CR=1). Some chips support 500 kHz only in certain regions, and the actual usable data rate is lower due to overhead.
Does the coding rate affect the bitrate?
Yes. The coding rate adds redundancy bits. A coding rate of 4/5 (CR=1) gives a factor of 0.8, while 4/8 (CR=4) gives 0.5. So the bitrate is reduced by 20% to 50% compared to no coding (which is not used in practice).
How do I convert time on air to a duty cycle?
Divide the time on air by the interval between transmissions. For example, if a packet takes 0.1 s and you send every 10 s, the duty cycle is 1%. Many regions limit duty cycle to 1%, so adjust your interval accordingly.
Related
Formula used
in sf | Spreading factor | - | 7 | 7 in bw | Bandwidth (kHz) | kHz | 125 | 7.8 in cr | Coding rate | - | 1 | 0 in pl | Payload length | bytes | 20 | 1 out bitrate | Raw bitrate | bps | (sf * (4 / (4 + cr)) * (bw * 1000)) / (2 ^ sf) | 0 out toa | Time on air | s | (8 * pl + 16 + 4 * sf - 20 + 8) / bitrate | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.