Sonar in a browser tab: an inaudible chirp finds the nearest wall, to about 4 cm
Processed in your browser. Nothing is uploaded. Updated on 24 Oct 2026.A phone can measure a room by playing an inaudible chirp and timing the echo, to about 4 cm. Useful when a tape measure is not to hand. What it needs is the microphone, a quiet moment, and a hard flat wall to bounce off.
Press Check this device and allow the microphone; the page tests whether it can play and hear 18 to 20 kHz.
If it says This device can do it, press Take a baseline and keep still and quiet while the direct path is recorded.
Point the device at a hard flat surface such as a wall or door and press Measure.
Read the distance to the strongest reflector and its Confidence on screen, then press Stop.
This tool turns a laptop or a phone into a short-range sonar. A chirp sweeping from 18 kHz to 20 kHz, above what most adults can hear, is played through the speaker while the microphone records. The recording is compared with the chirp that was sent, the echo is found, and the delay is converted into a distance.
The arithmetic is the same as a parking sensor: distance equals half the round trip time multiplied by the speed of sound, 343 metres per second at 20 degrees Celsius. Three refinements make it work on hardware that was never designed for it.
Matched filtering: the recording is cross-correlated with the chirp. A chirp correlated against itself produces one sharp spike, so an echo far below the noise floor still appears as a peak. Baseline subtraction: the speaker sits centimetres from the microphone, so the direct path is hundreds of times louder than any echo and its ringing covers the beginning of the correlation. A baseline is captured first with the same chirp and subtracted, leaving what changed. And a guard distance: the first 25 centimetres are ignored entirely, because nothing there can be separated from the direct path.
Range is roughly three to four metres in a quiet room. The 2 kHz bandwidth of the chirp sets a resolution cell of about nine centimetres, which is the speed of sound divided by twice the bandwidth; interpolating the correlation peak narrows a single strong reflector to roughly four centimetres, but two reflectors closer together than the cell merge into one. Soft furnishings absorb 18 to 20 kHz almost completely, so a curtain, a sofa, a bed or a carpeted wall returns nothing measurable. Hard flat surfaces such as plaster, glass and doors work best.
Before starting, the tool checks that your device can actually produce and hear the band, because many laptop speakers roll off above 16 kHz and some microphones are filtered by their driver. If the chirp comes back no louder than the silence, the tool refuses to start rather than reporting confident nonsense.
A chirp sweeping 18 to 20 kHz plays through the speaker while the microphone records. The recording is cross-correlated with the chirp, which turns a faint echo into a sharp peak, and the delay of that peak is halved and multiplied by 343 metres per second, the speed of sound in air at 20 degrees.
Roughly four centimetres for a single strong reflector within three to four metres, in a quiet room with a hard flat surface. The chirp's 2 kHz bandwidth sets a resolution cell of about nine centimetres, so two objects closer together than that merge into one peak and are reported as a single distance.
Soft material absorbs 18 to 20 kHz almost completely. Curtains, sofas, beds, carpet and clothing return nothing measurable, and neither does an open doorway. Point the device at a wall, a door, a window or a cupboard instead, and keep the room quiet, because a fan or a keyboard raises the noise floor the echo has to stand above.
Most adults cannot. Sensitivity above 17 kHz falls with age for nearly everybody, so 18 to 20 kHz is silent to the majority of listeners. Children, teenagers and some adults hear it clearly as a faint tick or whine, and pets often react to it, so consider that before running it repeatedly.
The speaker is only centimetres from the microphone, so the direct path is hundreds of times louder than any echo and its ringing covers the start of the correlation. Capturing a baseline and subtracting it removes that fixed signature and leaves only what changed, which is the reflection you are looking for.
Many laptop speakers roll off above 16 kHz and some microphones are filtered by their driver, in which case there is nothing in the band to correlate. The check compares the chirp with silence, and if it is not at least six decibels louder the tool stops rather than reporting confident nonsense.
Still stuck? Ask about Measure Distance with Sound and anybody who knows can answer. No account needed.
Also works as: Sonar Distance Measure · Ultrasonic Tape Measure · Measure a Room with Your Phone.
Same job, other tools: Fix Audio in One Ear – Recording only plays in one earbud? Make it mono so both ears hear it · Hz Generator – Type a frequency in hertz and hear it, from 20 Hz to 20,000 Hz · Mic Test – See your voice on a live waveform and hear it played straight back.
On the related tools: Increase Audio Volume – Raise a quiet recording as far as it will go before anything starts to distort.
In the collection Audio Test Tools.