The speed of sound in seawater is by no means constant, depending on the water's density (and therefore on temperature, depth and salinity) but can be calculated approximately with the following equation:

c(D,S,t) = c(0,S,t) + (16.23 + 0.253t)D + (0.213-0.1t)D2 + [0.016 + 0.0002(S-35)](S - 35)tD

where

c(0,S,t) = 1449.05 + 45.7t - 5.21t2 + 0.23t3 + (1.333 - 0.126t + 0.009t2)(S - 35)

and

t = T/10 where T = temperature in degrees Celsius
S = salinity in parts per thousand
D = depth in kilometers

Range of validity: temperature 0 to 35 degrees Celsius, salinity 0 to 45 parts per thousand, depth 0 to 4000 m

This equation was developed by one Dr. A.B. Coppins in 1981 and published in the Journal of the American Society of Acoustic Sciences.