Ultrasonic Distance Measurement

d = v × t / 2

Calculator

Result

Formula

d = v_sound × t / 2, v_sound ≈ 343 m/s at 20°C

Description

Ultrasonic distance sensors measure the time for a sound pulse to travel to a target and return (echo). Since the sound travels to the target and back, the one-way distance is half the round-trip time multiplied by the speed of sound. The speed of sound in air at 20°C is approximately 343 m/s (0.0343 cm/µs). Temperature affects the speed of sound significantly: v ≈ 331.3 + 0.606 × T(°C) m/s. Common ultrasonic sensors like HC-SR04 measure distances from 2 cm to 400 cm with ±3 mm accuracy.

Variables

  • d — Distance to target (m)
  • t — Round-trip echo time (s)

Practical Notes

At 20°C, sound travels about 0.343 mm/µs or 34.3 cm/ms. A target at 1 m distance produces a round-trip time of 2/343 ≈ 5.83 ms. The minimum detectable distance is limited by the transmit pulse duration (typically 0.3-1 ms, corresponding to 5-17 cm minimum range). Maximum range is limited by signal attenuation and beam spreading. Temperature compensation improves accuracy: at 0°C, v = 331 m/s (−3.5%); at 40°C, v = 355 m/s (+3.5%).

Need more features?

Save calculations, import telemetry data, simulate battery discharge, and collaborate with your team.

Try the App