Bluetooth RSSI to distance: why it's not a ruler
Every BLE scan result carries a number that looks like distance: RSSI, the received signal strength, in dBm. It's always negative, and closer to zero means stronger. People reasonably assume it converts to meters.
It does, sort of. There's a standard formula, it's easy to implement, and the answer it gives you is frequently wrong by a factor of two or three. That's not a bug in your code — it's the physics. This guide covers the conversion, why it degrades, and the technique that actually works for locating a device.
The formula
Radio signals fall off with distance in a predictable way, described by the log-distance path loss model:
RSSI = A - 10 · n · log10(d)
Where:
dis distance in metersAis the RSSI you'd measure at exactly 1 meter — the reference powernis the path loss exponent: 2 in free space, typically 2–4 indoors
Solve for distance and you get:
d = 10 ^ ((A - RSSI) / (10 · n))
In free space, the useful shorthand is that every 6 dB of loss doubles the distance. A signal at -59 dBm at 1 m reads about -65 dBm at 2 m, -71 dBm at 4 m, -77 dBm at 8 m.
Where it falls apart
The formula needs two inputs you almost never have reliably.
You don't know A
The reference power depends entirely on how hard the transmitter is shouting. A coin-cell beacon configured for battery life and a mains-powered gateway with an external antenna can sit at the same distance and differ by 20 dB — which the formula happily reads as a 10× difference in distance.
This is exactly why Apple's iBeacon format reserves a byte for measured power, a
factory-calibrated RSSI at 1 meter. The beacon tells you A because there is no way to infer it.
You can see that field decoded in the
advertisement decoder — load the iBeacon example and look at
"Measured power." Devices that don't broadcast a calibration value leave you guessing, and the
guess is usually a hardcoded -59 dBm that fits almost nothing.
You don't know n
Picking the path loss exponent is picking your answer. Take a reading of -79 dBm against a -59 dBm reference:
| Path loss exponent | Environment | Estimated distance |
|---|---|---|
| n = 2 | Open outdoor space | 10.0 m |
| n = 2.5 | Large open room | 6.3 m |
| n = 3 | Typical indoor, some walls | 4.6 m |
| n = 4 | Dense obstruction, multipath | 3.2 m |
Same radio measurement, same reference, a 3× spread in the answer — decided entirely by a constant
you guessed. And n is not even constant within one room.
The 2.4 GHz band is absorbed by water
Bluetooth Low Energy operates around 2.4 GHz, and water absorbs that frequency efficiently. A human body is mostly water. Standing between your phone and a beacon can cost 10–20 dB, which the formula reads as the device having moved several meters away.
This is a genuine nuisance for distance estimates and a genuinely useful tool for direction finding — more on that below.
Reflections add signal that didn't travel straight
Indoors, the signal reaching your antenna arrived by several paths: direct, plus bounces off walls, floors, appliances, and filing cabinets. Those copies arrive slightly out of phase and can add or cancel. The result is that RSSI varies with position, not just distance. Move your phone 15 cm and watch a reading swing 8 dB while the distance barely changed.
Sitting perfectly still, a stationary device's RSSI typically wanders over a range of 5–10 dB. That's your noise floor before you've moved at all.
What RSSI is actually good for
Absolute distance is the wrong question. Change over time is the right one.
RSSI is a reliable gradient. All the unknowns that wreck the absolute conversion — transmit power, antenna design, obstruction — stay roughly constant while you walk around a room. So the trend is trustworthy even when the number isn't:
- Getting stronger over several seconds means you're getting closer.
- Getting weaker means you're getting further away.
- Stable means you haven't changed the geometry.
That's enough to find things, and it's the basis of the hot-and-cold sweep described in how to find BLE devices around you.
Use your body as a directional antenna
A BLE scan gives you no bearing — only strength. But you can manufacture directionality from the absorption problem above. Hold your phone against your chest and turn slowly through a full circle, watching the trend. When your body sits between the phone and the device, the reading drops noticeably. When you're facing it, the reading recovers.
It's crude, it takes a few rotations to be confident, and it works. This is the single most useful technique for narrowing "somewhere in this room" down to "that wall."
Practical rules
- Never present a computed distance as a measurement. If you display meters, treat it as an order of magnitude. "Within a couple of meters" is defensible; "3.4 m" is not.
- Smooth before you decide. A single packet is noise. Average or take a rolling median over several seconds; BLE advertising intervals mean you'll get anywhere from a few to dozens of packets in that window.
- Compare a device against itself, never against another device. Two devices at the same distance with different transmit powers will rank in the wrong order.
- Trust ordering only at the extremes. -45 dBm is genuinely closer than -90 dBm. -67 versus -71 is a coin flip.
- Move slowly. The averaging that removes noise needs time. Walking briskly while watching RSSI gives you neither a clean reading nor a usable trend.
Why proximity "zones" work better than numbers
Because the error bars are wide but not infinite, bucketing is more honest than converting. Grouping readings into coarse zones — immediate, near, far — survives the uncertainty that a decimal figure hides. It's the approach iBeacon takes, and it's why BLE Sniffer's proximity radar shows relative positions rather than claiming a distance in meters.
If you want to work with the raw numbers yourself, BLE Sniffer for Android logs RSSI per packet and exports to CSV, so you can do your own smoothing and see how much a "stationary" reading really moves.
Related reading
- How to find BLE devices around you — the full sweep technique for physically locating a device
- How BLE advertising works — what else is in the packet the RSSI came attached to
- How to identify an unknown Bluetooth device — once you've found it, working out what it is