Ultrasonic Level Calculator (Time of Flight and Temperature)

An ultrasonic level transmitter sends a sound pulse down to the liquid surface and times the echo. Because the speed of sound in air changes about 0.6 m/s per °C, temperature compensation is essential. This ultrasonic level calculator converts echo time into distance and level — see ultrasonic level transmitter working and how an ultrasonic level transmitter works.

°C
calculated
calculated
calculated
Type in any field to change it. Press × on a value to calculate that field instead.

How to use the ultrasonic level calculator

Enter the round-trip echo time, the air temperature in the tank and the empty distance from the sensor face to the bottom (0% level). You get the speed of sound, the distance to the surface and the liquid level.

Ultrasonic level formula

c = 331.3 × √(1 + T/273.15) m/s  ·  d = c × t ÷ 2  ·  Level = E − d

Speed of sound in air

Temperature Speed of sound Distance error if 20 °C assumed
-20 °C 318.9 m/s -7.1%
0 °C 331.3 m/s -3.5%
10 °C 337.3 m/s -1.7%
20 °C 343.2 m/s +0.0%
30 °C 349.0 m/s +1.7%
40 °C 354.7 m/s +3.4%
60 °C 365.9 m/s +6.6%
80 °C 376.7 m/s +9.8%

Example

Echo time 20 ms at 30 °C, empty distance 6 m:

  • c = 349.0 m/s, distance = 349.0 × 0.020 ÷ 2 = 3.49 m
  • Level = 6 − 3.49 = 2.51 m

Installation tips

  • Keep the liquid surface out of the blanking distance at maximum level.
  • Mount away from the tank wall, inlet stream and internal ladders to avoid false echoes.
  • Use the sensor’s built-in temperature probe; vapour layers with a different gas composition still cause errors.
  • For foam, vapour or pressure, consider radar level measurement.

Frequently asked questions

How does an ultrasonic level sensor calculate distance?

Distance = speed of sound × echo time ÷ 2, because the pulse travels down and back. Level = empty distance − measured distance.

How much does temperature affect the reading?

The speed of sound changes by about 0.17% per °C. Without compensation, a 20 °C error causes about 3.5% distance error.

What is the blanking distance?

A zone just below the sensor where echoes cannot be measured while the transducer is still ringing — typically 0.25–0.5 m.

When is ultrasonic a poor choice?

With heavy vapour, foam, dust, high pressure or vacuum, or strong turbulence. Radar is usually better in those cases.

Embed this calculator

Free to use on your website or blog. Copy this code: