---
title: "Computes LoRa link SNR margin by comparing received power against the noise floor and the spreading-factor-dependent demodulation threshold from the Semtech SX1276 datasheet. Calculates receiver noise floor from thermal noise (-174 dBm/Hz), channel bandwidth, and receiver noise figure. Returns margin in dB and a boolean link-OK indicator. Use to validate whether a LoRa or Meshtastic link will reliably decode packets. Accepts rx_power from link_budget tool output for end-to-end chain analysis."
method: POST
path: "/api/snr_margin"
tags: ["mesh"]
---

# Computes LoRa link SNR margin by comparing received power against the noise floor and the spreading-factor-dependent demodulation threshold from the Semtech SX1276 datasheet. Calculates receiver noise floor from thermal noise (-174 dBm/Hz), channel bandwidth, and receiver noise figure. Returns margin in dB and a boolean link-OK indicator. Use to validate whether a LoRa or Meshtastic link will reliably decode packets. Accepts rx_power from link_budget tool output for end-to-end chain analysis.

`POST /api/snr_margin`

## Request

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

## Request body

- object
  - `rx_power_dbm` number, required: Received signal power in dBm (e.g., -110). Typically from a link budget calculation or field measurement.
  - `sf` number: LoRa spreading factor (7-12). Higher SF tolerates lower SNR.
  - `bw_khz` unknown
  - `noise_figure_db` number: Receiver noise figure in dB. Typical LoRa radio NF is 6 dB (SX1276).

## Response `200`

Computed result for snr_margin

- object
  - `result` object, required
    - `margin_db` number, required: SNR margin above demodulation threshold in dB. Positive = link OK, negative = link failure.
    - `noise_floor_dbm` number, required: Receiver noise floor in dBm, computed from bandwidth and noise figure.
    - `required_snr_db` number, required: Minimum SNR required for successful LoRa demodulation at the given SF.
    - `link_ok` boolean, required: True if margin_db > 0 (signal exceeds demodulation threshold).
  - `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)
