---
title: Link budgets, worked for Wi-Fi
heading: Adding up a radio link in decibels, transmit power, antenna gains, free-space path loss and why it grows with frequency, indoor path-loss exponents and walls, receiver sensitivity and margin, and estimating a Wi-Fi router's range at each data rate
eyebrow: D4 · Lesson 9 · Link budgets, worked for Wi-Fi
xp: 40
---

::: hook
Will the Wi-Fi reach the back bedroom? A radio engineer answers with a **link budget**: start with the transmitter's power, add the antennas' gains, subtract every loss along the way, and compare what's left with what the receiver needs. Working in decibels turns all the multiplying into adding, so the whole calculation fits on the back of an envelope. It explains why 5 GHz Wi-Fi is faster but doesn't reach as far, why each wall matters, and why the router's speed falls in steps as you walk away.
:::

::: play
- Received power against distance from a Wi-Fi router transmitting 20 dBm (100 mW) through 2 dBi antennas at each end, with path loss $PL(1\text{ m}) + 10n\log_{10}d$ plus any walls.
- n = 2 is free space; indoor paths through furniture and people usually behave like n = 3 to 3.5. Each interior wall costs roughly 3 to 6 dB, taken here as 5 dB.
- The dashed lines are typical sensitivities: −65 dBm for 54 Mb/s and −82 dBm for 6 Mb/s. Where the curve crosses them is the range for each rate.
:::

```sim plot
view: graph
x: d = 1..300 log
y: P = -100..-10
slider: f = 2.4..6 step 0.1 = 2.4
slider: n = 2..4 step 0.1 = 3
slider: w = 0..4 step 1 = 0
plot: 24 - 20*log(4*pi*f*1e9/3e8) - 10*n*log(d) - 5*w | samples: 300 | label: received power, dBm (d in m, f in GHz)
plot: -65 + 0*d | dashed | color: ch3 | label: 54 Mb/s needs −65 dBm
plot: -82 + 0*d | dashed | color: ch4 | label: 6 Mb/s needs −82 dBm
readout: path loss at 1 m, dB = 20*log(4*pi*f*1e9/3e8) | digits: 4
readout: range at 54 Mb/s, m = 10^((24 - 20*log(4*pi*f*1e9/3e8) - 5*w + 65)/(10*n)) | digits: 3
readout: range at 6 Mb/s, m = 10^((24 - 20*log(4*pi*f*1e9/3e8) - 5*w + 82)/(10*n)) | digits: 3
```

::: predict
## A 2.4 GHz router sends 20 dBm through 2 dBi antennas at each end. Indoors with a path-loss exponent of 3, how much power arrives 10 m away?

- [ ] −6 dBm
- [ ] −26 dBm
- [x] About −46 dBm
- [ ] About −96 dBm

::: reveal
The path loss to 1 m at 2.4 GHz is 20 log₁₀(4π × 1 m/0.125 m) = 40.0 dB, and from 1 m to 10 m with n = 3 another 30 dB. So 20 + 2 + 2 − 40 − 30 = −46 dBm, about 25 nanowatts, which is 50 dB above the −96 dBm noise floor of lesson 1: plenty for the fastest rates.
:::
:::

::: nameit
## The budget

In decibels, the received power is

$$P_r = P_t + G_t + G_r - L_\text{path} - L_\text{other}$$

with powers in dBm (decibels relative to 1 mW: 20 dBm = 100 mW, −80 dBm = 10 pW), antenna gains in dBi and losses in dB. The **link margin** is $P_r$ minus the receiver's **sensitivity**, the least power at which a given rate still works. A positive margin of 10 dB or more allows for fading.

## Free-space path loss

Between antennas a distance d apart at wavelength λ = c/f,

$$L_\text{fs} = 20\log_{10}\frac{4\pi d}{\lambda}$$

which grows 6 dB for every doubling of distance and every doubling of frequency. The frequency dependence comes from the receiving antenna: an antenna of fixed gain captures less power at shorter wavelengths, so 5.8 GHz loses 7.7 dB more than 2.4 GHz over the same path.

## Indoors

Walls, floors and furniture absorb and scatter, so measured indoor loss grows faster with distance: $L = L(1\text{ m}) + 10n\log_{10}d$ with n around 3. Each wall adds a few decibels, a concrete floor 10 to 20.

## Rates and range

Each Wi-Fi rate needs a certain SNR (lesson 5), so a certain received power. As distance grows the router steps down through slower modulations and codes, which is why speed falls in steps.
:::

::: example
## With n = 3, how far does the 2.4 GHz router reach at 6 Mb/s (−82 dBm) and at 54 Mb/s (−65 dBm)? And at 5.8 GHz?

::: solution
1. **Allowed loss at 6 Mb/s.**
   $$24 + 82 = 106\ \text{dB}$$
2. **Range at 6 Mb/s.**
   $$40.05 + 30\log_{10} d = 106$$
   gives
   $$\begin{aligned} d &= 10^{65.95/30} \\ &= 158\ \text{m} \end{aligned}$$
3. **At 54 Mb/s.** The allowance is 89 dB, so 43 m.
4. **At 5.8 GHz.** The 1 m loss is 47.7 dB, so the 6 Mb/s range shrinks to 88 m.
5. **In free space.** In open free space (n = 2) the 2.4 GHz range would be about 2 km.

**Answer:** at 2.4 GHz it reaches 158 m at 6 Mb/s and 43 m at 54 Mb/s; at 5.8 GHz the 6 Mb/s range is 88 m.
:::
:::

::: example
## A laptop is 20 m away through two 5 dB walls. Can it get 54 Mb/s?

::: solution
1. **Received power.**
   $$\begin{aligned} P_r &= 24 - 40.05 \\ &\quad - 30\log_{10}20 - 10 \\ &= -65.1\ \text{dBm} \end{aligned}$$
2. **Margin.** Against a sensitivity of −65 dBm, that's a margin of −0.1 dB.
3. **In practice.** It's right at the edge, so the link will drop to a slower rate whenever someone walks through the path.

**Answer:** only just: it receives −65.1 dBm against the −65 dBm it needs, so the link sits right at the edge.
:::
:::

::: example
## How much does doubling the distance cost with a path-loss exponent of 3, and in free space?

::: solution
1. **Loss per doubling.** With exponent n the loss grows by $10n\log_{10}2$.
2. **Exponent 3.**
   $$30\log_{10}2 = 9.0\ \text{dB}$$
3. **Free space.** With n = 2:
   $$20\log_{10}2 = 6.0\ \text{dB}$$
4. **Compare.** Indoors, every doubling of range costs half again as many decibels as outdoors.

**Answer:** doubling the distance costs 9.0 dB with n = 3 and 6.0 dB in free space.
:::
:::

::: check
given: d = 10 | 100 | 1000; f = 0.9 | 2.4 | 5.8
answer: 20*log(4*pi*d*f*1e9/3e8)
unit: dB
tolerance: 0.5%

## What's the free-space path loss over {d} m at {f} GHz?

::: right
Right. $20\log_{10}(4\pi d/\lambda)$ = {answer} dB.
:::

::: misses
- [10*log(4*pi*d*f*1e9/3e8)] It's 20 log, since power falls as distance squared.
- [any] Not yet. Wavelength first, then the formula.
:::
:::

::: check
given: P = 10 | 20 | 30; a = 2 | 3 | 6; L = 60 | 80 | 100
answer: P + 2*a - L
unit: dBm
tolerance: 0.5%

## A transmitter sends {P} dBm through a {a} dBi antenna to a {a} dBi antenna, with {L} dB of total loss between them. What power arrives?

::: right
Right. $P_t + G_t + G_r - L$ = {answer} dBm.
:::

::: misses
- [P + a - L] Count both antennas.
- [any] Not yet. Add the gains, subtract the losses.
:::
:::

::: check
given: P = 14 | 20 | 23; n = 2.5 | 3 | 3.5; s = -90 | -82 | -70
answer: 10^((P + 4 - 40.046 - s)/(10*n))
unit: m
tolerance: 1%

## A 2.4 GHz link (40.0 dB of loss to 1 m) sends {P} dBm between 2 dBi antennas, with path-loss exponent {n}. How far can the receiver be if it needs {s} dBm?

::: right
Right. $10^{(P_t + G - L_1 - S)/10n}$ = {answer} m.
:::

::: misses
- [10^((P + 4 - 40.046 - s)/20)] Use the exponent n, not free space's 2.
- [any] Not yet. Set the received power equal to the sensitivity and solve for d.
:::
:::

::: check
given: P = 3 | 10 | 20 | 30
answer: 10^(P/10)
unit: mW
tolerance: 0.5%

## What's {P} dBm in milliwatts?

::: right
Right. $10^{P/10}$ = {answer} mW.
:::

::: misses
- [10^(P/20)] Power uses 10 log, not 20 log.
- [any] Not yet. Undo the decibels.
:::
:::

::: check
kind: parts
given: n = 2 | 3 | 3.5; k = 2 | 4 | 10

## Path loss grows with distance to the power {n}. A link's distance grows {k} times.

::: part
answer: 10*n*log(k)
unit: dB
tolerance: 0.5%

### How much more loss is there?

::: misses
- [any] $10n\log_{10}k$.
:::
:::

::: part
answer: 10^(10*n*log(k)/10)
tolerance: 0.5%

### By what factor does the received power fall?

::: misses
- [any] $k^n$.
:::
:::
:::

::: check
kind: parts
given: P = 15 | 20 | 24; G = 2 | 5; L = 80 | 95 | 110; S = -82 | -65

## A transmitter of {P} dBm uses antennas of {G} dBi at each end over {L} dB of path loss; the receiver needs {S} dBm.

::: part
answer: P + 2*G - L
unit: dBm
tolerance: 0.5%

### What power arrives?

::: misses
- [P + G - L] Both antennas add gain.
- [any] $P_t + G_t + G_r - L$.
:::
:::

::: part
answer: P + 2*G - L - S
unit: dB
tolerance: 0.5%

### What is the margin?

::: misses
- [any] Received less sensitivity.
:::
:::
:::

::: explain
## Why does 5 GHz Wi-Fi reach less far than 2.4 GHz Wi-Fi with the same transmit power and antennas?

::: model
The power a receiving antenna collects depends on its effective area, and an antenna of a given gain has an effective area proportional to the square of the wavelength. At 5.8 GHz the wavelength is about 2.4 times shorter than at 2.4 GHz, so the receiving antenna captures about 2.4 squared, almost six times, less of the spreading power, which is the extra 7.7 dB of free-space path loss. Walls and other obstacles also tend to absorb more at higher frequencies. With less power arriving at every distance, the received signal falls below each rate's sensitivity sooner, so the range at each rate is shorter, although the wider 5 GHz channels give faster rates up close.
:::
:::

::: practice

::: check
given: d = 1 | 40000000; f = 0.1 | 30
answer: 20*log(4*pi*d*f*1e9/3e8)
unit: dB
tolerance: 0.5%

## Free-space loss: {d} m at {f} GHz?

::: misses
- [any] $20\log(4\pi d/\lambda)$.
:::
:::

::: check
given: P = 10 | 14 | 20 | 23 | 30; a = 0 | 2 | 3 | 6 | 9; L = 50 | 130
answer: P + 2*a - L
unit: dBm
tolerance: 0.5%

## Received: {P} dBm, two {a} dBi antennas, {L} dB of loss?

::: misses
- [any] $P_t + G_t + G_r - L$.
:::
:::

::: check
given: P = -30 | -20 | -13 | -6 | 3 | 7 | 17 | 27 | 36
answer: 10^(P/10)
unit: mW
tolerance: 0.5%

## {P} dBm in mW?

::: misses
- [any] $10^{P/10}$.
:::
:::
:::
