Seawater density calculator from salinity, temperature and pressure
This seawater density calculator estimates density in kilograms per cubic metre from practical salinity, water temperature, and pressure.
Run — free
It combines a standard polynomial approximation for seawater at the surface with a simple compressibility correction for pressure. The result is useful for quick oceanographic checks, buoyancy estimates, classroom work, and engineering screening where a reproducible approximation is more appropriate than a full thermodynamic standard. Inputs are checked explicitly, including rejection of negative salinity and temperatures below the calculator's 0 °C freezing boundary.
Enter salinity, temperature, and pressure consistently
Provide practical salinity in PSU, temperature in degrees Celsius, and pressure in decibars. Typical open-ocean salinity is near 35 PSU, while fresher coastal or estuarine water can be much lower. A pressure of 0 dbar represents the surface reference used by the polynomial. Ocean pressure increases by roughly one decibar per metre of depth, so a value such as 1000 dbar is broadly associated with deep water near 1000 metres, although the exact pressure-depth relationship varies with latitude and local density. The calculator accepts finite numeric values only and applies documented bounds suited to its simplified model. Salinity cannot be negative, temperature cannot be below 0 °C, and pressure cannot be negative. These checks prevent mathematically possible but physically misleading output. Enter measured values without unit conversions hidden in the numbers: do not submit kelvin as temperature, pascals as pressure, or a mass fraction as salinity. The returned object repeats the normalized inputs alongside density, which makes automated results easier to audit and prevents uncertainty about which units were used.
Understand the simplified equation of state
The calculation begins with a fifth-order polynomial for pure-water density as a function of temperature. It then adds salinity terms proportional to salinity, salinity raised to the power of one and a half, and salinity squared. This structure follows the familiar EOS-80 atmospheric-pressure density approximation and captures the main effects that cooler water is generally denser and dissolved salts add mass. The calculator next applies a deliberately simplified pressure correction using a constant 2.2 GPa bulk modulus. In decibar units, that correction divides surface density by one minus pressure divided by 220000. Pressure therefore increases the reported density because seawater is compressed. The response includes both density_at_surface_kg_m3 and density_kg_m3, allowing you to see the pressure contribution separately. Values are rounded to six decimal places so repeated calls and browser calculations remain stable. This is a deterministic analytic estimate: it uses no network service, lookup table, random value, or clock. The same inputs consequently produce the same JSON result every time.
Interpret the result and know its limits
Use density_kg_m3 as the pressure-adjusted estimate for the supplied conditions. Use density_at_surface_kg_m3 when you need to compare samples on the same zero-pressure basis or isolate the effects of salinity and temperature. The model is well suited to rapid comparisons, preliminary buoyancy calculations, sanity checks on sensor data, teaching demonstrations, and reproducible software tests. It is not a replacement for TEOS-10, the Gibbs Seawater library, or a certified oceanographic workflow. A constant bulk modulus does not capture the detailed way compressibility changes with temperature, salinity, and pressure, and practical salinity is not identical to absolute salinity. The fixed 0 °C input boundary is also a validation rule for this calculator, not a prediction of the true freezing point of every seawater sample; saline water can remain liquid below 0 °C. For navigation, custody transfer, high-accuracy hydrography, or research conclusions sensitive to small density differences, use an appropriate thermodynamic standard and calibrated measurements. Treat this result as an explicitly simplified estimate whose assumptions are visible and repeatable.
What you can do with it
Screen ocean sensor readings
Turn salinity, temperature, and pressure observations into a quick density estimate for range checks and data-quality rules.
Estimate buoyancy inputs
Obtain an approximate fluid density for early-stage buoyancy, displacement, or underwater equipment calculations.
Teach seawater properties
Compare how temperature, dissolved salt, and pressure influence density with a transparent and repeatable model.
FAQ
What does the API calculation cost?
Each API request costs $0.002. The browser calculation is available without an API request.
Which units should I use?
Enter salinity in PSU, temperature in degrees Celsius, and pressure in decibars. Density is returned in kilograms per cubic metre.
Why does pressure increase density?
Pressure compresses seawater into a slightly smaller volume. The calculator represents that effect with a constant bulk-modulus correction.
Is this TEOS-10 or a full EOS-80 implementation?
No. It uses an EOS-80-style surface-density polynomial and a simplified constant-compressibility pressure correction.
Why are temperatures below 0 degrees Celsius rejected?
The calculator uses 0 °C as a clear freezing boundary for its validated input range. Real saline water may remain liquid below that temperature.
Can I use this result for scientific publication or safety-critical design?
Use a full thermodynamic standard and calibrated observations when small density differences, certification, or safety decisions matter.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/earth/seawater-density \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"salinity":35,"temperature":15,"pressure":0}'const res = await fetch("https://api.kit.forhosting.com/earth/seawater-density", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"salinity": 35,
"temperature": 15,
"pressure": 0
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/earth/seawater-density",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"salinity": 35,
"temperature": 15,
"pressure": 0
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/earth/seawater-density", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"salinity":35,"temperature":15,"pressure":0}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"salinity":35,"temperature":15,"pressure":0}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/earth/seawater-density", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"salinity": 35,
"temperature": 15,
"pressure": 0
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "earth.seawater_density",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |