Use this calculator to estimate the amount of an ideal gas from its pressure, volume, and temperature. Enter pressure in kPa, volume in litres, and temperature in °C; it returns the amount in moles and the equivalent number of molecules. You need measurements or stated conditions for all three inputs.
Formula
The ideal gas law is PV = nRT. Rearranged to calculate the amount of gas, it is n = PV / (RT).
- P is absolute pressure in kilopascals (kPa).
- V is gas volume in litres (L).
- n is amount of gas in moles (mol).
- R is the gas constant, 8.31446261815324 J/(mol·K). In these units, this is equivalently 8.31446261815324 kPa·L/(mol·K), since 1 kPa·L = 1 J.
- T is absolute temperature in kelvins (K), calculated as temperature in °C + 273.15.
To estimate the number of molecules, use N = n × NA, where the exact Avogadro constant NA is 6.02214076 × 1023 mol−1. This calculator treats the gas as ideal and uses absolute pressure, not gauge pressure.
Worked Example
The default inputs are 101.325 kPa, 22.414 L, and 0 °C. First convert the temperature: T = 0 + 273.15 = 273.15 K.
Substitute into the ideal gas law:
n = (101.325 kPa × 22.414 L) / (8.31446261815324 kPa·L/(mol·K) × 273.15 K)
The numerator is 2271.57555 kPa·L, and the denominator is approximately 2271.09508 kPa·L/mol. Therefore, n ≈ 1.0002 mol, displayed to four decimal places.
For molecules, multiply the unrounded amount by Avogadro’s constant: N ≈ 1.0002114 mol × 6.02214076 × 1023 mol−1 ≈ 6.023 × 1023 molecules, displayed to three significant decimal places as configured.
Assumptions
- The gas behaves ideally; real-gas interactions and molecular volume are ignored.
- Pressure is absolute pressure. The calculator does not convert gauge pressure.
- The gas is at a uniform, known temperature and occupies the full stated volume.
- The molecular count is an estimate from moles using the exact Avogadro constant; it does not identify the gas or its composition.
What You’ll Need
- The gas pressure, recorded as an absolute pressure in kPa.
- The gas volume in litres.
- The gas temperature in degrees Celsius.
- A calculator or this page’s input fields. If your measurements use other units, convert them before entering values.
Step-by-Step
- Choose the quantity you want. The primary result is the amount of gas in moles. The second result converts that amount to a molecule count. For a mixture, the output is total gas amount, not the amount of any one component.
- Find absolute pressure. Use pressure relative to a vacuum, such as a barometric or absolute-pressure reading. If you only have gauge pressure, add the local atmospheric pressure to it, using consistent units. For example, a gauge reading of 20 kPa at an atmospheric pressure of 100 kPa corresponds to 120 kPa absolute. Do not enter a negative absolute pressure.
- Convert the volume to litres. Divide millilitres by 1,000, or multiply cubic metres by 1,000. For example, 500 mL is 0.500 L. Enter the volume occupied by the gas under the pressure and temperature conditions you are using.
- Enter the temperature in °C. The calculator adds 273.15 to convert Celsius to kelvins. Kelvin is required because gas-law calculations use absolute temperature. Do not enter a temperature below −273.15 °C.
- Calculate and read the mole result. The first result is n in mol, rounded to four decimal places. It describes the amount of gas implied by the three entered conditions under the ideal-gas assumption.
- Read the molecule estimate if useful. The second result multiplies the mole result by Avogadro’s constant. It is a count of molecules only when the gas particles are molecules; monatomic gases contain atoms instead. For mixtures, the count represents all particles only if the gas composition and particle type are understood.
- Check whether the ideal approximation fits. At high pressure or near condensation, real gases can differ appreciably from the ideal-gas result. For precision work, use an appropriate real-gas equation of state or measured compressibility data for the substance and conditions.
Common Mistakes
- Using gauge pressure as absolute pressure. Gauge pressure is measured relative to local air pressure. The gas law requires pressure relative to a vacuum.
- Entering Celsius as if it were kelvins. A temperature of 25 °C is 298.15 K, not 25 K. This conversion can substantially change the calculated amount.
- Mixing units. The calculator expects kPa and L. Entering Pa as though it were kPa makes the result 1,000 times too large; entering mL as L makes it 1,000 times too small.
- Using conditions from different measurements. Pressure, volume, and temperature must describe the same gas at the same state. Do not combine a volume measured after expansion with the original pressure.
- Reporting too many digits. The displayed result is rounded. The measurements’ precision and uncertainty usually limit meaningful digits, even if the formula produces more.
Tips
- Write down each input with its unit before calculating. Convert units explicitly rather than relying on memory.
- Use absolute pressure and kelvins in your own handwritten calculation too, so it can be checked directly against PV = nRT.
- Keep extra digits through intermediate calculations, then round the final result to match measurement precision.
- If comparing two gas samples, calculate each at its own measured pressure, volume, and temperature; do not assume identical conditions.
- For bench work, follow your lab method, the safety data sheet (SDS) and your supervisor.
Troubleshooting
The result is unexpectedly small or large: Check whether pressure is in kPa rather than Pa or bar, volume is in litres rather than millilitres, and temperature is entered in °C. Verify that pressure is absolute.
The calculator rejects the temperature: A Celsius temperature below −273.15 °C is physically impossible. Check for a sign error or confirm whether your thermometer reports kelvins; convert kelvins to Celsius by subtracting 273.15 before entry.
The result does not match a textbook example: Confirm the example’s gas constant and units. Some references use R = 0.0820574 L·atm/(mol·K), which requires pressure in atmospheres rather than kPa. Also check whether the reference rounds constants or uses a different stated standard temperature or pressure.
A real sample disagrees with the prediction: Check leaks, calibration, temperature gradients, and whether the volume is the gas volume at the stated pressure. At high pressures or low temperatures, non-ideal behaviour may be important. The ideal gas law cannot correct for those effects by itself.
Frequently Asked Questions
What is a gas calculation?
It is a calculation that uses measured or specified gas conditions and a gas-law relationship. This calculator uses pressure, volume, and temperature to find amount in moles.
Which gas law does this calculator use?
It uses the ideal gas law, PV = nRT, rearranged to n = PV/(RT).
Can I enter pressure in atmospheres or bar?
Not directly. Convert to kPa first: 1 atm = 101.325 kPa; 1 bar = 100 kPa. Use absolute pressure after conversion.
Why does the calculator convert Celsius to kelvins?
The gas-law temperature scale starts at absolute zero. Convert °C to K by adding 273.15 before using the equation.
Does the answer apply to every gas?
It is an ideal-gas estimate. Many gases behave close to ideally at moderate pressure and well above their condensation point, but deviations depend on the gas and conditions.
How do I calculate the amount of one gas in a mixture?
This calculator gives total gas amount. For an ideal mixture, multiply total moles by that component’s mole fraction, provided the composition is known.
Related
Formula used
in p | Gas pressure | kPa | 101.325 | 0 in v | Gas volume | L | 22.414 | 0 in t | Gas temperature | °C | 0 | -273.15 out n | Amount of gas | mol | p * v / (8.31446261815324 * (t + 273.15)) | 4 out N | Number of molecules | molecules | n * 6.02214076e23 | 3
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 with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- Gas Correction Factor Formula and Calculator0.9829
- Gas Correction Factor Calculator and Table1.2534
- Gas Temperature: Calculate It from Pressure and Volume298.15 K
- Gas Correction Factor Calculator: Formula and Uses107.322 same as input
- Gas Cv Calculator: Heat Capacity Ratio and Formula20.786 J/(mol·K)
- Density Temperature Correction Calculator and Formula999.25 kg/m^3