Skip to content
ENExplore Calculators

Ultrasonic Distance Calculator

Work out ultrasonic distance instantly with clear inputs, formula shown and shareable results.

About Ultrasonic Distance Calculator

Distance is half the echo time times the speed of sound, since the pulse travels out and back. Speed of sound varies as the square root of absolute temperature, roughly 0.6 m/s per degree, so ignoring temperature causes about 0.17% of error per degree — 17 mm at 10 m over 10 degrees.

Formula

Ultrasonic ranging

d = c x t / 2; c = 331.3 x sqrt(1 + T/273.15) m/s

Worked example

With the default values below, Ultrasonic Distance Calculator returns Distance to target of 776.26. Change any input above and every figure here is recalculated in your browser.

Inputs used

Echo round-trip time
4.5 ms
Air temperature
22 °C
Relative humidity
50 %

Results

Distance to target
776.26 mm
Speed of sound
345.00 m/s
Error if 20 C were assumed
-4.03 mm
Maximum measurement rate
185.19 Hz

Step by step

  1. 1Values used
  2. 2Ultrasonic ranging
  3. 3Distance to target= 776.26 mm
  4. 4Speed of sound= 345.00 m/s
  5. 5Error if 20 C were assumed= -4.03 mm
  6. 6Maximum measurement rate= 185.19 Hz

Assumptions and limits

  • The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Why is temperature compensation important?

Because the error is proportional to distance. At short range it is negligible, but at several metres a 20 degree swing moves the reading by centimetres.

What limits the measurement rate?

The previous echo must decay before the next burst, otherwise reverberation is mistaken for a target. Rate is roughly the inverse of the maximum round-trip time.

Ultrasonic Distance Calculator | Calcrivo