Density of gases and liquids
Density describes how much mass is packed into a given volume. The core idea behind density of gases and liquids is relating a measured or computed mass to the space it occupies. This calculator computes density \( \rho \), mass \( m \), or volume \( V \) using direct measurement for liquids or the ideal gas relationship for gases.
Core definitions and formulas
\[
\rho = \frac{m}{V}
\]
\[
\rho = \frac{P\,M}{R\,T}
\]
Symbols: \(m\) is mass, \(V\) is volume, \( \rho \) is density, \(P\) is pressure, \(T\) is absolute temperature, \(M\) is molar mass, and \(R\) is the gas constant (\(R \approx 8.314\ \mathrm{J\cdot mol^{-1}\cdot K^{-1}}\)). The ideal-gas expression applies to gases that behave approximately ideally; it requires \(T\) in kelvin and consistent SI units to produce \( \rho \) in \(\mathrm{kg\cdot m^{-3}}\).
How to interpret results
Larger density means more mass per unit volume (a “heavier” fluid for the same container size), while smaller density means less mass packed into the same space. Common laboratory units include \(\mathrm{g\cdot mL^{-1}}\) and \(\mathrm{g\cdot L^{-1}}\); the SI unit is \(\mathrm{kg\cdot m^{-3}}\). When solving for mass, results represent the amount of material in the entered volume at the given density (or gas state). When solving for volume, results represent the space required to hold the entered mass at the given density (or gas state).
- Unit mismatch: mixing \(\mathrm{g}\) with \(\mathrm{m^{3}}\) or using \(T\) in \(^{\circ}\mathrm{C}\) in gas calculations.
- Non-ideal gas conditions: high pressure or very low temperature can make \(\rho=\dfrac{PM}{RT}\) inaccurate.
- Nonpositive inputs: \(m \le 0\), \(V \le 0\), \(P \le 0\), \(T \le 0\), or \(M \le 0\) are physically invalid.
- Rounding too early: rounding intermediate values can noticeably shift the final unit-converted results.
Micro example: liquid with \(m=50\ \mathrm{g}\) and \(V=50\ \mathrm{mL}\) gives \( \rho=\dfrac{50}{50}=1.0\ \mathrm{g\cdot mL^{-1}} \) (about \(1000\ \mathrm{kg\cdot m^{-3}}\)).
Use this tool for quick lab-style calculations, unit conversions, and ideal-gas density estimates from \(P\), \(T\), and \(M\). Avoid using it as a substitute for real-gas modeling or mixture behavior; next-step concepts include compressibility factors, partial pressures, and uncertainty propagation in measured mass and volume.