Calculate pressure, volume, temperature, or moles using the ideal gas law at Standard Temperature and Pressure (STP). Perfect for chemistry students, educators, and scientists.
Calculate pressure, volume, temperature or moles using the Ideal Gas Law.
Standard Temperature and Pressure (STP) is defined as 0°C (273.15 K) and 1 atm.
P = nRT/V
P = (1 × 0.08206 × 273.15) ÷ 22.4
No result
The ideal gas law is a fundamental equation in chemistry and physics that describes the behavior of gases under various conditions.
PV = nRT
Solve ideal gas law problems instantly with our free STP calculator. Calculate pressure, volume, temperature, or moles using the fundamental gas law equation PV = nRT with precision and ease.
An ideal gas law calculator is a specialized tool that performs calculations using the fundamental gas equation PV = nRT. Our STP calculator helps students, researchers, and professionals solve complex gas problems by calculating any unknown variable when the other three are provided.
Standard Temperature and Pressure (STP) refers to reference conditions of 0°C (273.15 K) and 1 atmosphere (101.325 kPa). These standardized conditions enable consistent comparison of gas behaviors across experiments and applications.
The ideal gas law describes how gases behave under various conditions, making our calculator essential for chemistry homework, laboratory work, and engineering applications.
The ideal gas law is expressed by the equation:
Where:
This elegant equation combines several earlier gas laws (Boyle's law, Charles's law, and Avogadro's law) into a single, comprehensive relationship that describes how gases behave under various conditions.
The ideal gas law can be rearranged to solve for any of the variables:
To calculate pressure (P):
To calculate volume (V):
To calculate number of moles (n):
To calculate temperature (T):
When using the ideal gas law, keep these important points in mind:
Our STP calculator simplifies gas law calculations with an intuitive interface. Follow these step-by-step instructions to solve ideal gas law problems:
Let's work through an example calculation for finding the pressure of a gas at STP:
Using the formula for pressure:
This confirms that 1 mole of an ideal gas occupies 22.4 liters at STP (0°C and 1 atm).
The ideal gas law has extensive practical applications across scientific and engineering disciplines. Our STP calculator supports these diverse use cases:
While the ideal gas law is widely applicable, there are situations where alternative gas laws provide more accurate results:
Where:
When to use: For real gases at high pressures or low temperatures where molecular interactions become significant.
When to use: For more accurate predictions of non-ideal gas behavior, especially at high pressures.
When to use: When you need a flexible model that can be expanded to account for increasingly non-ideal behavior.
For specific conditions, you might use these simpler relationships:
The ideal gas law represents the culmination of centuries of scientific investigation into the behavior of gases. Its development traces a fascinating journey through the history of chemistry and physics:
This historical progression demonstrates how our understanding of gas behavior has evolved through careful observation, experimentation, and theoretical development.
Here are examples in various programming languages showing how to implement ideal gas law calculations:
1' Excel function to calculate pressure using the ideal gas law
2Function CalculatePressure(moles As Double, volume As Double, temperature As Double) As Double
3 Dim R As Double
4 Dim tempKelvin As Double
5
6 ' Gas constant in L·atm/(mol·K)
7 R = 0.08206
8
9 ' Convert Celsius to Kelvin
10 tempKelvin = temperature + 273.15
11
12 ' Calculate pressure
13 CalculatePressure = (moles * R * tempKelvin) / volume
14End Function
15
16' Example usage:
17' =CalculatePressure(1, 22.4, 0)
18
1def ideal_gas_law(pressure=None, volume=None, moles=None, temperature_celsius=None):
2 """
3 Calculate the missing parameter in the ideal gas law equation: PV = nRT
4
5 Parameters:
6 pressure (float): Pressure in atmospheres (atm)
7 volume (float): Volume in liters (L)
8 moles (float): Number of moles (mol)
9 temperature_celsius (float): Temperature in Celsius
10
11 Returns:
12 float: The calculated missing parameter
13 """
14 # Gas constant in L·atm/(mol·K)
15 R = 0.08206
16
17 # Convert Celsius to Kelvin
18 temperature_kelvin = temperature_celsius + 273.15
19
20 # Determine which parameter to calculate
21 if pressure is None:
22 return (moles * R * temperature_kelvin) / volume
23 elif volume is None:
24 return (moles * R * temperature_kelvin) / pressure
25 elif moles is None:
26 return (pressure * volume) / (R * temperature_kelvin)
27 elif temperature_celsius is None:
28 return ((pressure * volume) / (moles * R)) - 273.15
29 else:
30 return "All parameters are provided. Nothing to calculate."
31
32# Example: Calculate pressure at STP
33pressure = ideal_gas_law(volume=22.4, moles=1, temperature_celsius=0)
34print(f"Pressure: {pressure:.4f} atm")
35
1/**
2 * Ideal Gas Law Calculator
3 * @param {Object} params - Parameters for the calculation
4 * @param {number} [params.pressure] - Pressure in atmospheres (atm)
5 * @param {number} [params.volume] - Volume in liters (L)
6 * @param {number} [params.moles] - Number of moles (mol)
7 * @param {number} [params.temperature] - Temperature in Celsius
8 * @returns {number} The calculated missing parameter
9 */
10function idealGasLaw({ pressure, volume, moles, temperature }) {
11 // Gas constant in L·atm/(mol·K)
12 const R = 0.08206;
13
14 // Convert Celsius to Kelvin
15 const tempKelvin = temperature + 273.15;
16
17 // Determine which parameter to calculate
18 if (pressure === undefined) {
19 return (moles * R * tempKelvin) / volume;
20 } else if (volume === undefined) {
21 return (moles * R * tempKelvin) / pressure;
22 } else if (moles === undefined) {
23 return (pressure * volume) / (R * tempKelvin);
24 } else if (temperature === undefined) {
25 return ((pressure * volume) / (moles * R)) - 273.15;
26 } else {
27 throw new Error("All parameters are provided. Nothing to calculate.");
28 }
29}
30
31// Example: Calculate volume at STP
32const volume = idealGasLaw({ pressure: 1, moles: 1, temperature: 0 });
33console.log(`Volume: ${volume.toFixed(4)} L`);
34
1public class IdealGasLawCalculator {
2 // Gas constant in L·atm/(mol·K)
3 private static final double R = 0.08206;
4
5 /**
6 * Calculate pressure using the ideal gas law
7 * @param moles Number of moles (mol)
8 * @param volume Volume in liters (L)
9 * @param temperatureCelsius Temperature in Celsius
10 * @return Pressure in atmospheres (atm)
11 */
12 public static double calculatePressure(double moles, double volume, double temperatureCelsius) {
13 double temperatureKelvin = temperatureCelsius + 273.15;
14 return (moles * R * temperatureKelvin) / volume;
15 }
16
17 /**
18 * Calculate volume using the ideal gas law
19 * @param moles Number of moles (mol)
20 * @param pressure Pressure in atmospheres (atm)
21 * @param temperatureCelsius Temperature in Celsius
22 * @return Volume in liters (L)
23 */
24 public static double calculateVolume(double moles, double pressure, double temperatureCelsius) {
25 double temperatureKelvin = temperatureCelsius + 273.15;
26 return (moles * R * temperatureKelvin) / pressure;
27 }
28
29 /**
30 * Calculate moles using the ideal gas law
31 * @param pressure Pressure in atmospheres (atm)
32 * @param volume Volume in liters (L)
33 * @param temperatureCelsius Temperature in Celsius
34 * @return Number of moles (mol)
35 */
36 public static double calculateMoles(double pressure, double volume, double temperatureCelsius) {
37 double temperatureKelvin = temperatureCelsius + 273.15;
38 return (pressure * volume) / (R * temperatureKelvin);
39 }
40
41 /**
42 * Calculate temperature using the ideal gas law
43 * @param pressure Pressure in atmospheres (atm)
44 * @param volume Volume in liters (L)
45 * @param moles Number of moles (mol)
46 * @return Temperature in Celsius
47 */
48 public static double calculateTemperature(double pressure, double volume, double moles) {
49 double temperatureKelvin = (pressure * volume) / (moles * R);
50 return temperatureKelvin - 273.15;
51 }
52
53 public static void main(String[] args) {
54 // Example: Calculate pressure at STP
55 double pressure = calculatePressure(1, 22.4, 0);
56 System.out.printf("Pressure: %.4f atm%n", pressure);
57 }
58}
59
1#include <iostream>
2#include <iomanip>
3
4class IdealGasLaw {
5private:
6 // Gas constant in L·atm/(mol·K)
7 static constexpr double R = 0.08206;
8
9 // Convert Celsius to Kelvin
10 static double celsiusToKelvin(double celsius) {
11 return celsius + 273.15;
12 }
13
14 // Convert Kelvin to Celsius
15 static double kelvinToCelsius(double kelvin) {
16 return kelvin - 273.15;
17 }
18
19public:
20 // Calculate pressure
21 static double calculatePressure(double moles, double volume, double temperatureCelsius) {
22 double temperatureKelvin = celsiusToKelvin(temperatureCelsius);
23 return (moles * R * temperatureKelvin) / volume;
24 }
25
26 // Calculate volume
27 static double calculateVolume(double moles, double pressure, double temperatureCelsius) {
28 double temperatureKelvin = celsiusToKelvin(temperatureCelsius);
29 return (moles * R * temperatureKelvin) / pressure;
30 }
31
32 // Calculate moles
33 static double calculateMoles(double pressure, double volume, double temperatureCelsius) {
34 double temperatureKelvin = celsiusToKelvin(temperatureCelsius);
35 return (pressure * volume) / (R * temperatureKelvin);
36 }
37
38 // Calculate temperature
39 static double calculateTemperature(double pressure, double volume, double moles) {
40 double temperatureKelvin = (pressure * volume) / (moles * R);
41 return kelvinToCelsius(temperatureKelvin);
42 }
43};
44
45int main() {
46 // Example: Calculate volume at STP
47 double volume = IdealGasLaw::calculateVolume(1, 1, 0);
48 std::cout << "Volume: " << std::fixed << std::setprecision(4) << volume << " L" << std::endl;
49
50 return 0;
51}
52
An ideal gas law calculator solves gas law problems using the equation PV = nRT. Our STP calculator helps you find pressure, volume, temperature, or moles when three variables are known, making it essential for chemistry students and professionals.
To calculate pressure with our ideal gas law calculator, enter the volume (L), number of moles, and temperature (°C). The calculator applies the formula P = nRT/V to determine pressure in atmospheres instantly.
Standard Temperature and Pressure (STP) defines reference conditions of 0°C (273.15 K) and 1 atmosphere (101.325 kPa). These standardized conditions allow scientists to compare gas behaviors consistently across experiments using our STP calculator.
Yes! Our ideal gas law calculator is perfect for chemistry homework, lab calculations, and exam preparation. Simply input three known values, and the calculator solves for the fourth variable using the ideal gas law equation.
The gas constant (R) equals 0.08206 L·atm/(mol·K) when using atmospheres and liters. Our STP calculator automatically uses this value for all ideal gas law calculations, ensuring accurate results.
The ideal gas law provides excellent accuracy at low pressures and high temperatures. Our calculator works best for typical laboratory conditions but becomes less accurate at extreme pressures or temperatures where real gas effects dominate.
At STP conditions (0°C, 1 atm), one mole of ideal gas occupies exactly 22.4 liters. Our ideal gas law calculator uses this fundamental relationship for accurate gas volume calculations.
Add 273.15 to Celsius temperatures: K = °C + 273.15. Our STP calculator automatically handles this conversion, so you can input temperatures in Celsius for convenience.
Temperature must be in Kelvin (always positive) for ideal gas law calculations. Our calculator prevents errors by converting Celsius inputs to Kelvin automatically, ensuring valid results.
Consider alternative equations for high-pressure (>10 atm) or low-temperature conditions where intermolecular forces become significant. For standard laboratory conditions, our ideal gas law calculator provides excellent accuracy.
According to Boyle's law (part of the ideal gas law), pressure and volume are inversely related at constant temperature. Our calculator demonstrates this relationship when you modify pressure values and observe volume changes.
STP specifically refers to 0°C and 1 atm, while standard conditions may vary. Our STP calculator uses the standard definition to ensure consistent, comparable results for gas law calculations.
Atkins, P. W., & de Paula, J. (2014). Atkins' Physical Chemistry (10th ed.). Oxford University Press.
Chang, R. (2019). Chemistry (13th ed.). McGraw-Hill Education.
IUPAC. (1997). Compendium of Chemical Terminology (2nd ed.) (the "Gold Book"). Compiled by A. D. McNaught and A. Wilkinson. Blackwell Scientific Publications, Oxford.
Lide, D. R. (Ed.). (2005). CRC Handbook of Chemistry and Physics (86th ed.). CRC Press.
Petrucci, R. H., Herring, F. G., Madura, J. D., & Bissonnette, C. (2016). General Chemistry: Principles and Modern Applications (11th ed.). Pearson.
Zumdahl, S. S., & Zumdahl, S. A. (2016). Chemistry (10th ed.). Cengage Learning.
National Institute of Standards and Technology. (2018). NIST Chemistry WebBook, SRD 69. https://webbook.nist.gov/chemistry/
International Union of Pure and Applied Chemistry. (2007). Quantities, Units and Symbols in Physical Chemistry (3rd ed.). RSC Publishing.
Get instant, accurate results for all your gas law calculations with our free STP calculator. Perfect for students, researchers, and professionals who need reliable ideal gas law solutions.
Key Benefits:
Whether you're solving chemistry homework, conducting laboratory research, or designing engineering systems, our ideal gas law calculator delivers the precision and convenience you need for successful gas law calculations.
Discover more tools that might be useful for your workflow