ThisCalculator

Chemistry

Density Calculator by Temperature: How It Works

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Density Calculator by Temperature: How It Works

This calculator computes the density of a substance at a given temperature, using its density at a reference temperature and the volumetric thermal expansion coefficient. You enter the reference density, the temperature change, and the expansion coefficient, and you get the corrected density in kg/m³ (or g/cm³). The result accounts for the fact that most materials expand when heated, so their density decreases.

Formula

The calculator uses the standard thermal expansion formula:

�(T) = �₀ / (1 + β × ΔT)

  • Ï�(T) – density at the new temperature (kg/m³ or g/cm³)
  • Ï�â‚€ – density at the reference temperature (same unit as Ï�(T))
  • β – volumetric thermal expansion coefficient (1/K or 1/°C)
  • ΔT – temperature change (K or °C, since a difference is the same in both)

This formula assumes the expansion coefficient is constant over the temperature range, which is true for small temperature changes. For large ranges, β itself varies, and you would need a more complex equation of state.

Worked Example

Using the default values: water at 20°C has a density of 998.21 kg/m³. The volumetric expansion coefficient of water at 20°C is about 0.000207 per K. If the temperature rises by 20 K (to 40°C), the density becomes:

� = 998.21 / (1 + 0.000207 × 20) = 998.21 / 1.00414 = 994.10 kg/m³.

The calculator shows 994.10 kg/m³, which matches the known density of water at 40°C (992.2 kg/m³, slight difference due to the coefficient not being perfectly constant).

Why Temperature Changes Density

Density is mass per unit volume. When a material heats up, its molecules move more and take up more space, so the volume increases while mass stays the same – density drops. This is why hot air rises (it is less dense) and why water expands when heated (though water has an anomaly near 4°C).

For gases, the effect is much stronger than for liquids or solids. Air at 20°C has a density of about 1.204 kg/m³, but at 100°C it drops to about 0.946 kg/m³ – a 21% decrease. For comparison, water only changes by about 4% over the same temperature range.

How to Choose the Expansion Coefficient

The expansion coefficient (β) is a property of the material. You can find it in engineering handbooks or online databases. Here are some typical values at 20°C:

  • Water: 0.000207 /K
  • Ethanol: 0.00109 /K
  • Mercury: 0.000181 /K
  • Aluminum: 0.000069 /K (linear coefficient × 3)
  • Steel: 0.000036 /K (linear coefficient × 3)

For solids, the volumetric coefficient is approximately three times the linear coefficient (α), because expansion happens in all three dimensions. For gases, you can calculate β from the ideal gas law: β = 1/T (in kelvin) for an ideal gas at constant pressure.

Common Mistakes and Pitfalls

  • Using linear instead of volumetric coefficient: For solids, the linear coefficient (α) is often given. Multiply by 3 to get β.
  • Mixing up °C and K: A temperature difference of 1°C equals 1 K, so you can use either for ΔT. But the absolute temperature in the gas law must be in kelvin.
  • Assuming constant β: The formula is accurate only for small temperature ranges. For water, β changes significantly above 40°C.
  • Forgetting the reference temperature: The density Ï�â‚€ is always at a specific temperature. If you use the density at 4°C for water (1000 kg/m³) but the coefficient at 20°C, the result will be off.

Limitations and When to Use a Different Approach

This calculator is best for small temperature changes (a few tens of degrees) and for materials with a fairly constant expansion coefficient. For extreme temperature ranges, you need:

  • For water: Use the IAPWS-95 equation of state, which is accurate from -20°C to 1000°C.
  • For air: Use the ideal gas law or the more accurate moist air formulas (e.g., CIPM-2007).
  • For metals: Use polynomial fits of density vs. temperature from NIST or other standards.

Also, this formula does not account for pressure changes. For gases, pressure has a huge effect on density, so you would need the combined gas law.

Practical Applications

Knowing how density changes with temperature is essential in many fields:

  • HVAC and meteorology: Air density affects heat transfer, fan performance, and weather patterns.
  • Oceanography: Water density differences drive ocean currents.
  • Chemical engineering: Reactor volumes and pipe flows depend on fluid density at operating temperatures.
  • Automotive: Fuel density changes with temperature, affecting fuel economy readings.
  • Brewing: Specific gravity readings are temperature-corrected to get accurate alcohol content.

For example, a storage tank holding 10,000 liters of ethanol at 20°C will hold about 10,070 liters at 30°C (since β=0.00109, ΔT=10, volume increases by 1.09%). The mass stays the same, so the density drops from 789 kg/m³ to about 780 kg/m³.

Frequently Asked Questions

Why does water have a maximum density at 4°C?

Water is unusual because it contracts when heated from 0°C to 4°C. This is due to hydrogen bonding. Below 4°C, water expands as it cools, which is why ice floats. This anomaly means the simple formula fails for water below 4°C – the density actually increases with temperature in that range.

Can I use this for gases?

Yes, but with caution. For an ideal gas at constant pressure, β = 1/T (in kelvin). At 20°C (293 K), β ≈ 0.00341 /K, which is much larger than for liquids. The formula works, but you must ensure the pressure is constant. For high accuracy, use the ideal gas law instead.

What is the difference between density and specific weight?

Density is mass per unit volume (kg/m³). Specific weight is weight per unit volume (N/m³), which equals density times gravitational acceleration (g ≈ 9.81 m/s²). The distinction matters in fluid mechanics.

How do I convert from kg/m³ to lb/ft³?

Multiply by 0.062428. For example, 1000 kg/m³ × 0.062428 = 62.43 lb/ft³. Conversely, multiply lb/ft³ by 16.018 to get kg/m³.

Does the calculator work for saltwater?

Not directly. Saltwater density depends on salinity as well as temperature. You would need to know the density of the specific saltwater at the reference temperature, and then apply the expansion coefficient for that salinity. The coefficient changes with salinity, so you cannot use pure water values.

Why does my result differ from published density tables?

Published tables often use more accurate equations of state that account for the temperature dependence of β. For example, the density of water at 40°C is 992.2 kg/m³, while our formula gives 994.1 kg/m³ – a 0.2% error. For most practical purposes, that is fine, but for precise work, use the full equation.

Related

Formula used
in rho_ref | Reference density | kg/m³ | 1000 | 0
in beta | Expansion coefficient | 1/K | 0.000207 | 0
in delta_T | Temperature change | K | 20 | 0
out rho | Density at new temp | kg/m³ | rho_ref / (1 + beta * delta_T) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.