# Calculating density using temp. and salinity?

1. Feb 12, 2010

### thethedev

Hi
Does anyone know how to work out the density of water using just the temperature and the salinity?
There must be a formula as I've found a few sites that do the conversion for you but I need the actual formula.
Any help at all is appreciated thanks

2. Feb 12, 2010

### Spinnor

Maybe not much help but my web browser allows me to view the web page source which for the following page has the formula as part of the web page:

from

http://www.csgnetwork.com/h2odenscalc.html

function rhoscalc (rho,conc,temp) { // temp and conc dependent density

var rhos, A, B, temp;

A = 0.824493 - 0.0040899*temp + 0.000076438*Math.pow(temp,2)-0.00000082467*Math.pow(temp,3) + 0.0000000053675*Math.pow(temp,4);

B = -0.005724 + 0.00010227*temp - 0.0000016546*Math.pow(temp,2);

rhos = rho + A*conc + B*Math.pow(conc,(3/2)) + 0.00048314*Math.pow(conc,2);

return rhos;

}

You might be able to reverse engineer the formula you need?