Free online gas law calculator. Solve for pressure, volume, moles, or temperature using the ideal gas equation (PV = nRT). Instant unit conversion. Perfect for chemistry students, lab technicians, and anyone working with gas calculations.
An Ideal Gas Law calculator (also called a PV = nRT calculator orgas law solver) is an online tool that solves the fundamental equation of state for an ideal gas. The ideal gas law, expressed as PV = nRT, relates the pressure (P), volume (V), temperature (T), and number of moles (n) of a gas through the universal gas constant (R = 8.314 J/(mol·K)). This equation is one of the cornerstones of chemistry and thermodynamics, providing a simple yet powerful way to predict gas behavior under various conditions.
Whether you are a high school or college chemistry student, a laboratory technician, a researcher, or a professional working with pressurized systems, you will frequently need to solve gas law problems. Our free online gas law calculator allows you to enter any three of the four variables (P, V, n, T) and instantly calculates the fourth - eliminating algebraic errors and tedious unit conversions. It also supports verification mode: if you enter all four values, the calculator checks whether they satisfy the PV = nRT equation with high precision.
This ideal gas equation solver operates entirely within your browser - no data is sent to any server, ensuring your privacy and enabling offline use. It supports 7 pressure units (Pa, kPa, MPa, atm, bar, mmHg, psi), 6 volume units (m³, L, mL, cm³, ft³, gal), and 3 temperature units (K, °C, °F) - all automatically converted to base SI units before the calculation. Whether you are doing stoichiometry, studying gas‑phase reactions, or designing industrial equipment, this tool is your go‑to solution for ideal gas law problems.
Using this PV = nRT calculator is straightforward:
Example: Suppose you have 2.00 moles of an ideal gas at 300 K in a 0.500 m³ container. To find the pressure, you would enter n = 2.00, T = 300 K, V = 0.500 m³, leave P empty, and the calculator will compute the pressure in your selected unit.
Note: Temperature must be entered in Kelvin (K) for the equation to work directly; however, our calculator automatically converts Celsius (°C) and Fahrenheit (°F) to Kelvin internally.
The ideal gas law is an equation of state for an ideal gas - a hypothetical gas where molecules have zero volume and do not interact except through perfectly elastic collisions. While no real gas is perfectly ideal, many common gases (air, nitrogen, oxygen, hydrogen) behave very close to ideal at ordinary temperatures and pressures, making the equation highly useful.
The equation can be rearranged to solve for any variable:
The universal gas constant R is a fundamental physical constant with the value 8.314462618 J·mol⁻¹·K⁻¹ (exactly when using SI units). For historical and practical reasons, R also appears in other forms, such as 0.082057 L·atm·mol⁻¹·K⁻¹ when pressure is in atmospheres and volume in liters. Our calculator uses R = 8.314 J/(mol·K) internally after converting your inputs to SI units.
| Unit | Symbol | Value in Pa | Common Uses |
|---|---|---|---|
| Pascal | Pa | 1 | SI base unit, stress analysis |
| Kilopascal | kPa | 1,000 | Engineering, tyre pressure (most countries) |
| Megapascal | MPa | 1,000,000 | Material strength, hydraulics |
| Atmosphere | atm | 101,325 | Standard atmospheric pressure, chemistry |
| Bar | bar | 100,000 | Meteorology, diving, industrial processes |
| Millimeter of mercury | mmHg | 133.322 | Blood pressure, barometers, vacuum systems |
| Pounds per square inch | psi | 6,894.76 | Tyre pressure (US), air tools, plumbing |
| Unit | Symbol | Value in m³ | Common Uses |
|---|---|---|---|
| Cubic meter | m³ | 1 | SI base unit, construction, billing |
| Liter | L | 0.001 | Standard lab unit, beverages |
| Milliliter | mL | 1 × 10⁻⁶ | Medicine, chemistry lab, pipettes |
| Cubic centimeter | cm³ | 1 × 10⁻⁶ | Equivalent to mL, engine displacement |
| Cubic foot | ft³ | 0.0283168 | Construction, HVAC, gas appliances |
| Gallon (US) | gal | 0.00378541 | Fuel, large containers (US) |
| Unit | Symbol | Value in K | Common Uses |
|---|---|---|---|
| Kelvin | K | T | SI base unit, thermodynamics, science |
| Celsius | °C | T + 273.15 | Weather, cooking, everyday life |
| Fahrenheit | °F | (T − 32) × 5/9 + 273.15 | US weather, baking, body temperature |
The universal gas constant (R) is a proportionality constant that appears in the ideal gas law. Its numerical value depends on the units used for pressure, volume, and energy. The SI value is R = 8.314462618 J·mol⁻¹·K⁻¹, which is exact under the 2019 redefinition of SI units. However, for many practical chemistry calculations, the value R = 0.082057 L·atm·mol⁻¹·K⁻¹ is more convenient when working with liters and atmospheres.
| Value of R | Units | When to Use |
|---|---|---|
| 8.314 | J·mol⁻¹·K⁻¹ | SI: Pa, m³, K, moles |
| 8.314 | m³·Pa·mol⁻¹·K⁻¹ | SI: Pa, m³ (identical to J) |
| 0.082057 | L·atm·mol⁻¹·K⁻¹ | Common in chemistry: L, atm, K |
| 62.364 | L·mmHg·mol⁻¹·K⁻¹ | When pressure is in torr/mmHg |
| 8.314 | cm³·MPa·mol⁻¹·K⁻¹ | When pressure is in MPa, volume in cm³ |
Our calculator always uses R = 8.314 J/(mol·K) internally, but it automatically converts your chosen pressure and volume units to Pa and m³ before performing the calculation. This ensures maximum accuracy without you having to remember which R value to use.
The ideal gas law is used to determine the number of moles of gas produced in a reaction, calculate the molar mass of a volatile substance, and predict how gas volume changes with temperature or pressure in closed systems. For example, finding the volume of CO₂ generated when an antacid tablet dissolves.
Engineers use the ideal gas law to design pressurized tanks, gas pipelines, combustion engines, HVAC systems, and compressed air systems. Knowing how pressure and temperature affect gas volume is essential for safety and efficiency.
Weather forecasters use the ideal gas law to understand air pressure changes with altitude, which helps predict wind patterns and storm formation. Rising warm air (lower density) leads to low surface pressure and often precipitation.
Anesthesia machines, ventilators, and oxygen cylinders all rely on gas law calculations. The volume of gas delivered to a patient must be accurately calculated from pressure and temperature conditions.
Divers use the ideal gas law to estimate how long their air supply will last at depth, where increased pressure causes the gas to be consumed more quickly than at the surface. The calculator can help plan safe dive profiles.
The ideal gas law is an approximation that works best underlow pressures and high temperatures. Under these conditions, gas molecules are far apart and move so quickly that intermolecular attractions and molecular volume become negligible.
At high pressures (e.g., above 100 atm) or low temperatures(near the condensation point), real gases deviate significantly from ideal behavior:
For very precise work at extreme conditions, engineers use more complex equations of state, such as the van der Waals equation (which adds correction terms for molecular attraction and volume), the Redlich‑Kwong equation, or the Peng‑Robinson equation. However, for most educational and practical engineering applications at normal temperatures and pressures (0–200 °C, 1–50 atm), the ideal gas law provides excellent accuracy.
Calculate the volume of 1.00 mole of an ideal gas at standard temperature and pressure (STP = 0 °C = 273.15 K, 1 atm). Using PV = nRT:
This is the well‑known molar volume of an ideal gas at STP.
A 5.00 L container holds 0.400 mol of an ideal gas at 25 °C (298.15 K). Find the pressure in atm.
Calculate the number of moles of gas in a 22.4 L container at 1 atm and 273 K.
Rearrange the equation to P = nRT / V. Convert all units to consistent values (e.g., pressure in Pa or atm, volume in m³ or L, temperature in K), and then calculate. Our calculator does all of this automatically.
The Kelvin scale is an absolute temperature scale starting at absolute zero (0 K). Using Celsius would give incorrect results because the proportional relationship between gas volume and temperature fails when the scale does not start at the absolute zero point. Our calculator automatically converts °C and °F to Kelvin.
Common values include: 8.314 J·mol⁻¹·K⁻¹ (SI), 0.082057 L·atm·mol⁻¹·K⁻¹(chemistry), and 62.364 L·mmHg·mol⁻¹·K⁻¹ (when pressure is in mmHg). Our calculator always uses the SI value internally after unit conversion, so you never need to look up the correct R.
The calculator uses the exact value of R = 8.314462618 J·mol⁻¹·K⁻¹ (the 2019‑definition exact value) and performs unit conversions using standard, internationally recognized conversion factors (e.g., 1 atm = 101325 Pa exactly). Results are displayed to 6 decimal places, which is more than sufficient for educational and most engineering applications.
Yes. Enter the three values you know, and the calculator will compute the fourth, providing a quick check of your manual calculation. Alternatively, enter all four values - the calculator will confirm whether they satisfy PV = nRT within the selected unit system.
Yes. Once the page has loaded, all calculation logic runs locally in your browser. No internet connection is required after the initial page load - perfect for lab use, homework sessions, or field work.
Discover more free developer tools that might interest you.
Calculate acceleration from velocity and time
Use ToolCalculate chemical concentrations
Use ToolCalculate density from mass and volume
Use ToolCalculate solution dilutions
Use ToolCalculate force using Newton's laws
Use ToolCalculate kinetic energy from mass and velocity
Use ToolRead the how-to, then come back to this tool when you are ready to run it locally.