Activity and Fugacity Calculator
Correct pressure and mole fraction for non-ideal behavior, and see how it shifts the chemical potential.
🧮 What are Activity and Fugacity?
Fugacity and activity are the corrections that let the simple chemical potential formulas work for real gases and real solutions. For an ideal gas the chemical potential is μ° + RT ln(P/P°), and for an ideal solution it is μ* + RT ln x. Real systems depart from these because molecules attract and repel each other. Fugacity f replaces the pressure of a real gas by an effective pressure, so that μ = μ° + RT ln(f/P°) stays true. Activity a replaces the mole fraction of a solution component by an effective concentration, so that μ = μ* + RT ln a stays true.
Both are tied to a correction factor. The fugacity coefficient φ = f/P tells you how far a gas is from ideal behavior, and the activity coefficient γ = a/x does the same for a solution component. A value of 1 means ideal. Chemical engineers use fugacity for high-pressure vapor-liquid equilibrium and for gas-phase equilibrium constants, as in ammonia synthesis at hundreds of bar. Geochemists use it for fluids deep in the crust, and physical chemists use activity to describe non-ideal mixtures and electrolyte solutions.
It is easy to mix these ideas up. Fugacity is a property of a gas (or of a component in the gas phase) and has the units of pressure. Activity is dimensionless and refers to a component in any phase, relative to a standard state. Neither is a measured quantity by itself: each is defined through the chemical potential. This page does not estimate the ionic activity coefficient from ionic strength; for that see the Debye-Huckel activity coefficient calculator, which can supply a gamma that you enter here.
The calculator has two modes. Gas fugacity uses the two-term virial equation with the second virial coefficient B, giving φ, f, the compressibility factor Z and the chemical potential shift RT ln φ. Solution activity multiplies the mole fraction by an activity coefficient you provide and shows the shift RT ln a, split into the ideal and excess parts. Each mode draws a chart against the ideal case. The virial coefficients in the gas presets are rounded and approximate.
📐 Formula
📖 How to Use This Calculator
Steps
💡 Example Calculations
Example 1 - Carbon dioxide at 20 bar
CO2 at 300 K, 20 bar, B = −122 cm3/mol (approximate)
Example 2 - Methane at 50 bar
Methane at 300 K, 50 bar, B = −42 cm3/mol (approximate)
Example 3 - A positive-deviation mixture
x = 0.5, γ = 1.8 (illustrative), 298.15 K
Example 4 - A dilute component with negative deviation
x = 0.1, γ = 0.72 (illustrative), 298.15 K
❓ Frequently Asked Questions
📚 Sources and Notes
The definitions of fugacity and the fugacity coefficient follow the Wikipedia article on fugacity and the LibreTexts chapter on the chemical potential and fugacity of a gas. The closed form ln phi = BP/RT for a gas with Z = 1 + BP/RT follows directly from the integral definition. The second virial coefficients in the gas presets are rounded, approximate values near 300 K and are illustrative; the activity coefficients in the examples are also illustrative, not measured data.
See also the chemical potential calculator, the virial equation of state calculator and the activity coefficient calculator.
🔗 Related Calculators
What is fugacity?
Fugacity is an effective pressure that replaces the real pressure in the chemical potential expression for a non-ideal gas. It is defined so that mu = mu0 + RT ln(f/P0), and it equals the pressure for an ideal gas.
What is the fugacity coefficient?
The fugacity coefficient phi is the ratio f/P of fugacity to pressure. It is 1 for an ideal gas, below 1 when attractions dominate and above 1 when repulsions dominate. It measures the non-ideal part of the molar Gibbs energy: RT ln phi.
How do you calculate fugacity from the virial equation?
With the pressure-form virial equation Z = 1 + BP/RT, ln phi = BP/RT, so f = P exp(BP/RT). For CO2 at 300 K and 20 bar with B = -122 cm3/mol, ln phi = -0.0978, phi = 0.9068 and f = 18.14 bar.
What is the relation between Z and the fugacity coefficient?
ln phi equals the integral from 0 to P of (Z - 1)/P dP. For a gas that follows Z = 1 + BP/RT the integrand is constant, so ln phi = BP/RT, which equals Z - 1.
What is activity?
Activity is a dimensionless effective concentration: a = gamma x for a component in a solution, with x the mole fraction and gamma the activity coefficient. It replaces x in the chemical potential: mu = mu* + RT ln a.
What does an activity coefficient greater than 1 mean?
Gamma above 1 means the component escapes from the solution more readily than ideal mixing predicts, a positive deviation from Raoult's law. Gamma below 1 means the component is held more strongly, a negative deviation.
How does the chemical potential change with fugacity or activity?
The shift from the ideal value is RT ln phi for a gas at the same pressure, or RT ln gamma for a solution component at the same mole fraction. At 298.15 K, gamma = 1.8 shifts the chemical potential by +1.457 kJ/mol.
How is this different from the Debye-Huckel activity coefficient calculator?
The Debye-Huckel page estimates the activity coefficient of ions from ionic strength. This page takes gamma or the virial coefficient as an input and turns it into activity, fugacity and a chemical potential shift. The two can be used together.
When is fugacity needed?
Use fugacity for gases at high pressure or low temperature, where pressure no longer represents the escaping tendency, for example in high-pressure equilibrium constants for ammonia synthesis. At low pressure f and P are almost the same.
Which units does the tool use?
Temperature is in kelvin, pressure and fugacity are in bar, and the second virial coefficient B is in cm3/mol. Chemical potential shifts are in kJ/mol.