Skip to main content

Ideal gas law calculator: PV = nRT

Solve PV = nRT by leaving one quantity blank. Pressure, volume, moles and temperature are converted automatically between common units.

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Calculate pressure, volume, amount of gas or temperature with the ideal gas law. Leave exactly one quantity blank when reverse solving is supported.

Ideal-gas model; absolute pressure and absolute temperature.

Results

Pressure
-
Volume
-
Amount of substance
-
Temperature
-

Calculation details

    Was this tool useful?

    How does this tool work?

    The ideal gas law connects pressure, volume, amount of substance and absolute temperature. Enter any three quantities and the calculator solves PV = nRT for the fourth while handling unit conversions.

    Calculations use pascals, cubic metres, moles and kelvins internally with R = 8.31446261815324 J·mol⁻¹·K⁻¹. Inputs are converted to coherent SI units before solving.

    Temperature in the equation is absolute. Celsius and Fahrenheit inputs are converted to kelvins before they enter PV = nRT.

    The ideal gas law is a model rather than an exact description of every real gas. Deviations become more important at high pressure and near condensation.

    How to use this tool

    1. Choose the unknown quantity

      Enter exactly three of pressure, volume, amount of substance and temperature. Leave the quantity to solve for blank; the calculator rearranges PV = nRT automatically.

    2. Check units and temperature

      Inputs are converted to a coherent unit system before calculation. Celsius and Fahrenheit temperatures are converted to kelvins because the ideal gas equation requires absolute temperature.

    3. Use absolute pressure

      Pressure in the equation is absolute. If your instrument reports gauge pressure, convert it to absolute pressure before using the value.

    4. Interpret the answer as an ideal model

      The result is most useful when the gas behaves approximately ideally. Deviations grow at high pressure, low temperature and near condensation.

    Good to know

    Kelvin is part of the physics, not just a unit preference

    Gas-law proportionalities use an absolute temperature scale. Substituting 20 for 20 °C is therefore incorrect; the appropriate absolute temperature is 293.15 K.

    Gauge pressure is not absolute pressure

    Many instruments report pressure relative to the surrounding atmosphere, whereas PV = nRT requires pressure measured from vacuum. Confusing the two can shift the input by roughly one atmosphere.

    Ideal gas behaviour is an approximation

    The model neglects molecular size and intermolecular interactions in its simplest form. Real gases often approach ideal behaviour at lower pressure and sufficiently high temperature but can depart substantially near phase changes.

    Formula

    The ideal gas law combines pressure, volume, amount of substance and absolute temperature in one relation. The calculator converts inputs so a consistent value of R can be used.

    Ideal gas law

    PV = nRT

    P is absolute pressure, V volume, n amount of substance and T absolute temperature.

    P
    absolute pressure
    V
    volume
    n
    amount of substance
    T
    absolute temperature
    R
    molar gas constant

    Use absolute pressure and absolute temperature. The model is most reliable for gases that are sufficiently dilute and away from condensation.

    Use cases

    Chemistry and thermodynamics homework

    Solve for one unknown in PV = nRT while checking the unit path. The worked relation is especially useful when a problem mixes litres, cubic metres, pascals, atmospheres, Celsius and kelvins.

    Estimating gas volume

    Given moles, temperature and pressure, estimate the volume an ideal gas would occupy. This provides a useful order-of-magnitude check before laboratory work or when comparing the same amount of gas under different conditions.

    Estimating pressure in a closed vessel

    For a known volume, temperature and amount of gas, calculate the theoretical absolute pressure. Treat the result as a physics estimate, not as a substitute for vessel ratings, safety procedures or a real-gas model at high pressure.

    Finding amount of substance from P, V and T

    When pressure, volume and temperature are measured, solving for n connects macroscopic gas measurements with moles. In chemistry exercises, that value can then be combined with molar mass or stoichiometry.

    Examples

    One mole at 0 °C

    Use V = nRT/P.

    Input

    n = 1 mol; T = 273.15 K; P = 101.325 kPa

    Result

    V ≈ 22.41 L

    Pressure in a vessel

    Absolute pressure is nRT/V.

    Input

    n = 2 mol; V = 10 L; T = 300 K

    Result

    P ≈ 498.9 kPa

    Tips and best practices

    • Use absolute pressure rather than gauge pressure.
    • Do not insert a Celsius value directly as T.
    • Use a real-gas model when the gas is strongly compressed.
    • If an answer looks unreasonable, first check litre-versus-cubic-metre and kPa-versus-Pa conversions.
    • When comparing two states of one sample, verify whether the amount of gas is actually constant before applying a combined-gas relationship.

    Sources and references

    Frequently asked questions

    What is R?

    R is the molar gas constant. This calculator uses the SI value 8.31446261815324 J·mol⁻¹·K⁻¹.

    Can I use litres and bar?

    Yes. The calculator converts compatible units before solving.

    Why must temperature be absolute?

    The ideal gas equation is defined on an absolute temperature scale, so 0 °C is 273.15 K.

    Does the law work for every gas?

    It is an ideal model. Real gases can deviate significantly at high pressure or low temperature.

    Can I mix bar and litres in the inputs?

    Yes. Compatible units are converted to a coherent system before the equation is solved.

    Why do real gases deviate from PV = nRT?

    At higher density, molecular volume and intermolecular forces are no longer negligible, so a real-gas equation may be more appropriate.

    Related tools

    Tools similar or complementary to this one.

    Similar tools

    Calculate density, mass or volume from any two known values with automatic unit conversion.

    ScienceNewFeaturedUse this tool