Physics Calculators

Ideal Gas Law Calculator | PV = nRT Tool

Free Ideal Gas Law Calculator for PV = nRT, pressure, volume, moles, temperature, combined gas law, gas density, molar mass, partial pressure, and STP/NTP.
🧪 Free Physics & Chemistry Gas Tool

Ideal Gas Law Calculator

Use this Ideal Gas Law Calculator to solve pressure, volume, moles, or temperature using \(PV=nRT\). The tool also includes combined gas law calculations, gas density and molar mass, partial pressures for gas mixtures, STP/NTP molar volume estimates, and energy-style unit conversions. It supports pressure, volume, temperature, amount, density, and molar mass units with formula steps, a gas-state diagram, and a copyable problem summary.

PV = nRT Solve P, V, n, T Combined Gas Law Gas Density Molar Mass Partial Pressure STP / NTP Unit Converter

Calculate Ideal Gas Law Values

Select a mode, enter known values, choose units, and calculate. The calculator converts inputs to SI units, applies the selected gas law formula, then returns results in your preferred units.

Ideal Gas Law Calculator

Combined Gas Law Calculator

For a fixed amount of gas: \(\frac{P_1V_1}{T_1}=\frac{P_2V_2}{T_2}\).

Gas Density and Molar Mass Calculator

Use \(\rho=\frac{PM}{RT}\) or \(M=\frac{\rho RT}{P}\).

Gas Mixture Partial Pressure Calculator

For ideal gas mixtures, \(P_i=x_iP_{total}\) and \(x_i=\frac{n_i}{n_{total}}\).

Molar Volume and STP / NTP Calculator

Gas Unit Converter

Physics note: the ideal gas law assumes point-like gas particles, negligible intermolecular forces, and low-to-moderate pressure conditions. Real gases can deviate significantly at high pressure, low temperature, or near condensation.

Formula Steps and Gas Law Breakdown

Copyable Ideal Gas Law Summary

Your ideal gas law summary will appear here after calculation.

What Is an Ideal Gas Law Calculator?

An Ideal Gas Law Calculator is a physics and chemistry tool that connects the pressure, volume, temperature, and amount of a gas. The central formula is \(PV=nRT\). This equation is one of the most useful relationships in introductory chemistry, thermodynamics, physics, environmental science, engineering, and laboratory work because it describes how a gas sample behaves under ideal assumptions.

The calculator can solve for pressure, volume, moles, or temperature. If you know any three of the four values, the fourth can be calculated. For example, if you know how many moles of gas are in a container, the volume of the container, and the temperature, you can calculate pressure. If you know pressure, volume, and temperature, you can calculate the number of moles. The same formula can be rearranged to solve every variable.

This tool also includes related gas-law features. The combined gas law compares two states of the same gas sample. The density calculator uses the ideal gas equation to estimate gas density or molar mass. The mixture calculator uses mole fractions to calculate partial pressures. The molar volume calculator estimates volume per mole under custom, STP, NTP, or room conditions. The unit converter helps students avoid common mistakes with pressure, volume, and temperature units.

The ideal gas law is powerful because it brings several older gas laws into one equation. Boyle’s Law connects pressure and volume. Charles’s Law connects volume and temperature. Avogadro’s Law connects volume and amount. Gay-Lussac’s Law connects pressure and temperature. The ideal gas law combines these relationships into a single model.

In real gases, molecules have finite size and forces between them. The ideal gas law ignores those complications. That means it works best at low pressure, high temperature, and conditions where the gas is far from condensation. For many classroom and approximate engineering problems, however, \(PV=nRT\) gives a useful and clear first model.

How to Use This Ideal Gas Law Calculator

Use the PV = nRT tab for the main equation. Select what you want to solve: pressure, volume, amount, or temperature. Enter the three known values. Choose the correct units for pressure, volume, moles, and temperature. Then click calculate. The calculator converts pressure to pascals, volume to cubic meters, amount to moles, and temperature to kelvin before applying the formula.

Use the Combined Gas Law tab when the amount of gas stays constant and the gas changes from one state to another. You can solve for final pressure, final volume, or final temperature. This is useful for problems where a balloon expands, a container is heated, or a gas is compressed while the number of moles stays fixed.

Use the Density / Molar Mass tab when you need gas density, molar mass, or pressure from density. This is useful for identifying a gas, estimating air density, comparing gases, and solving chemistry lab problems. Use the Gas Mixture tab when a container includes multiple ideal gases. The partial pressure of each gas equals its mole fraction multiplied by the total pressure.

Use the Molar Volume tab to estimate how much space one mole or multiple moles of an ideal gas occupies at a selected temperature and pressure. Use the Unit Converter tab when you only need to convert pressure, volume, or temperature units.

Ideal Gas Law Formula

The ideal gas law is:

Ideal gas law
\[PV=nRT\]

Where \(P\) is pressure, \(V\) is volume, \(n\) is amount in moles, \(R\) is the universal gas constant, and \(T\) is absolute temperature in kelvin.

Using SI units, the gas constant is:

Universal gas constant
\[R=8.314462618\ \text{J}\,\text{mol}^{-1}\,\text{K}^{-1}\]

The equation works because pressure times volume has units of energy. Since \(1\,Pa=1\,N/m^2\), multiplying pressure by volume gives \(Pa\cdot m^3=N\cdot m=J\). The right side, \(nRT\), also gives joules when SI units are used.

Solving for P, V, n, and T

The ideal gas law can be rearranged depending on the unknown variable. To solve for pressure:

Pressure from ideal gas law
\[P=\frac{nRT}{V}\]

To solve for volume:

Volume from ideal gas law
\[V=\frac{nRT}{P}\]

To solve for moles:

Moles from ideal gas law
\[n=\frac{PV}{RT}\]

To solve for temperature:

Temperature from ideal gas law
\[T=\frac{PV}{nR}\]

Temperature must be absolute temperature. Celsius and Fahrenheit values must be converted to kelvin before using the equation. A common mistake is entering 25°C as 25 K, which gives a physically different result.

Gas Constant and Unit Consistency

The value of \(R\) depends on the units used. This calculator uses the SI value \(8.314462618\,J/(mol\cdot K)\) internally. That means pressure is converted to pascals, volume to cubic meters, amount to moles, and temperature to kelvin. After solving, the result is converted back into the selected output unit.

Other common forms of \(R\) include \(0.082057\,L\cdot atm/(mol\cdot K)\), \(62.3637\,L\cdot torr/(mol\cdot K)\), and \(8.314\,L\cdot kPa/(mol\cdot K)\). Using the wrong gas constant with mixed units is one of the most common gas-law errors. The safest approach is to convert all values to SI units or to use a calculator that does the conversion consistently.

Combined Gas Law

When the number of moles is constant, the ideal gas law can be written as a relationship between two states:

Combined gas law
\[\frac{P_1V_1}{T_1}=\frac{P_2V_2}{T_2}\]

This equation is useful when a fixed gas sample changes pressure, volume, or temperature. For example, if a gas is compressed to a smaller volume at the same temperature, its pressure increases. If a gas is heated at constant volume, its pressure increases. If a gas is heated at constant pressure, its volume increases.

The combined gas law assumes constant amount of gas. If gas leaks out or gas is added, use the full ideal gas law with \(n\).

Gas Density and Molar Mass

The ideal gas law can be rearranged to calculate gas density. Since density is mass per volume and molar mass relates mass to moles, the density equation is:

Gas density formula
\[\rho=\frac{PM}{RT}\]

Where \(\rho\) is density, \(P\) is pressure, \(M\) is molar mass, \(R\) is the gas constant, and \(T\) is absolute temperature. Solving for molar mass gives:

Molar mass from density
\[M=\frac{\rho RT}{P}\]

This relationship is often used in chemistry to estimate the molar mass of an unknown gas from measured density, temperature, and pressure.

Gas Mixtures and Partial Pressure

For an ideal gas mixture, each gas contributes to total pressure. The mole fraction of gas \(i\) is:

Mole fraction
\[x_i=\frac{n_i}{n_{total}}\]

The partial pressure of gas \(i\) is:

Dalton’s law of partial pressure
\[P_i=x_iP_{total}\]

The total pressure is the sum of partial pressures:

Total pressure
\[P_{total}=P_1+P_2+\cdots+P_n\]

This is important in air composition, breathing gases, laboratory gas collection, diving calculations, and atmospheric science.

STP, NTP, and Molar Volume

Molar volume is the volume occupied by one mole of gas at a given temperature and pressure:

Molar volume
\[V_m=\frac{RT}{P}\]

At 273.15 K and 1 atm, one mole of ideal gas occupies about 22.414 L. At 273.15 K and 100 kPa, the molar volume is about 22.711 L. At room-like conditions, such as 298.15 K and 1 atm, the molar volume is about 24.465 L. This is why it is important to state the exact temperature and pressure when using “STP” or “standard conditions.”

Ideal vs Real Gases

The ideal gas law assumes that gas molecules have negligible volume and no intermolecular attractions or repulsions. Real gases do not perfectly satisfy these assumptions. Real-gas deviations become more noticeable at high pressure, low temperature, and conditions near liquefaction. In those cases, models such as the van der Waals equation or compressibility factor corrections may be needed.

For many educational problems and moderate conditions, \(PV=nRT\) is still a strong first approximation. The result should be treated as an ideal-model estimate, not a substitute for real-gas property tables or engineering-grade thermodynamic software.

Common Mistakes

The first common mistake is using Celsius directly in \(PV=nRT\). Temperature must be converted to kelvin. The second mistake is using a gas constant that does not match the units. The third mistake is mixing liters and cubic meters without conversion. The fourth mistake is using gauge pressure instead of absolute pressure. The ideal gas law uses absolute pressure.

The fifth mistake is assuming the ideal gas law works equally well for every gas under every condition. Real gases deviate near condensation, at very high pressure, and at low temperature. The sixth mistake is confusing mass with moles. The ideal gas law uses amount of substance in moles, not grams. To convert mass to moles, divide mass by molar mass.

Worked Examples

Example 1: Pressure from PV = nRT. If \(n=1\,mol\), \(T=273.15\,K\), and \(V=22.414\,L\):

Pressure example
\[P=\frac{nRT}{V}\approx1\,atm\]

Example 2: Moles from pressure, volume, and temperature. If \(P=1\,atm\), \(V=24.465\,L\), and \(T=298.15\,K\):

Moles example
\[n=\frac{PV}{RT}\approx1\,mol\]

Example 3: Gas density. For air with molar mass about \(28.97\,g/mol\) at 1 atm and 273.15 K:

Density example
\[\rho=\frac{PM}{RT}\approx1.29\,kg/m^3\]

Example 4: Partial pressure. If oxygen mole fraction is 0.21 in air at 1 atm:

Partial pressure example
\[P_{O_2}=x_{O_2}P_{total}=0.21(1)=0.21\,atm\]

Ideal Gas Law Calculator FAQs

What does this Ideal Gas Law Calculator do?

It calculates pressure, volume, moles, temperature, combined gas law values, gas density, molar mass, gas mixture partial pressures, molar volume, and unit conversions.

What is the ideal gas law formula?

The ideal gas law is \(PV=nRT\), where \(P\) is pressure, \(V\) is volume, \(n\) is moles, \(R\) is the gas constant, and \(T\) is absolute temperature.

What value of R does this calculator use?

The calculator uses \(R=8.314462618\,J/(mol\cdot K)\) internally and converts input units to SI units before solving.

Can I use Celsius in the ideal gas law?

You can enter Celsius in this calculator, but it is converted to kelvin internally. The formula itself requires absolute temperature.

What is the combined gas law?

The combined gas law is \(\frac{P_1V_1}{T_1}=\frac{P_2V_2}{T_2}\) for a fixed amount of gas.

How do I calculate gas density from the ideal gas law?

Use \(\rho=\frac{PM}{RT}\), where \(M\) is molar mass.

When does the ideal gas law fail?

It becomes less accurate at high pressure, low temperature, and near condensation because real gases have molecular volume and intermolecular forces.

Important Note

This Ideal Gas Law Calculator is for education, homework, estimation, and general science learning. It uses ideal gas assumptions and does not replace laboratory calibration, real-gas property tables, pressure-vessel design, safety engineering, or professional thermodynamic analysis.

Shares:

Related Posts