Engineering Calculators

Thermodynamics Calculators | Gas & Heat Laws

Solve gas laws, heat, work and efficiency with clear units, model assumptions, original thermodynamics examples and practice answers.
Thermodynamics energy-balance illustration showing heat entering a system, work leaving it and a change of internal energy inside.
Gas and heat laws

Thermodynamics calculator

Choose one of ten modes, select the unknown, and enter the known quantities. Results include units, a relation and a calculation table.

Calculate Gas and Heat Law Values

Select a mode, enter known values, and calculate gas state variables, heat transfer, work, internal energy, efficiency, or temperature changes.

Ideal Gas Law Calculator

Combined Gas Law Calculator

Boyle, Charles, Gay-Lussac, and Avogadro Calculator

Dalton Partial Pressure and Mole Fraction Calculator

Specific Heat Calculator

Latent Heat and Phase Change Calculator

First Law of Thermodynamics Calculator

Adiabatic Gas Process Calculator

Polytropic Process Calculator

Heat Engine, Refrigerator, and Carnot Efficiency Calculator

Disabled fields are calculated or unused for the selected mode; enter only enabled fields. All pressures are absolute. Temperature ratios use kelvin. Changing units converts existing values and clears results. Reset restores an example in the selected units.

Diagram and Calculation Details

Choose a thermodynamics model before calculating

Pressure, volume, temperature, heat and work describe different parts of a physical problem. Start with what is held constant, what can cross the system boundary and what you need to find. The ten calculator tabs above cover idealized gas states, gas mixtures, heating, phase changes and cyclic devices.

These are learning models. They do not supply material-property tables or certify real equipment. Gas composition, pressure range, phase, heat losses and changing heat capacities can all affect an engineering result. Use the stated assumptions before trusting the arithmetic.

Inputs, units and sign conventions

  1. Choose a tab and the unknown quantity. Enter the known quantities in their labelled units; a calculated field is not another independent measurement.
  2. Gas laws need absolute pressure, measured relative to vacuum. Add local atmospheric pressure to a gauge-pressure reading before entering it.
  3. Select kelvin or Celsius for temperature inputs. Temperature ratios require kelvin, while a temperature change has the same numerical size in kelvins and Celsius degrees.
  4. Volumes use cubic metres, amount of gas uses moles, masses use kilograms and energy uses joules. Convert litres before entering a volume.
  5. For the first law and expansion work, positive heat enters the system and positive work is done by the system. For engine and COP modes, enter heat and work magnitudes as labelled.
  6. Review the displayed units, assumptions and state table. After changing inputs or units, calculate again so the answer corresponds to the current fields.
T = t + 273.15   when T is in K and t is in °C
1 L = 0.001 m3   ·   1 kPa = 1000 Pa   ·   1 bar = 100000 Pa

One standard atmosphere is 101325 Pa. The default molar gas constant is approximately 8.314462618 J mol−1 K−1. Keep that SI value with pascals and cubic metres; do not substitute a litre-atmosphere gas constant without changing the units consistently. For example, 20 litres is 0.020 cubic metres, not 20 cubic metres.

Gas and heat law reference

Subscripts 1 and 2 label initial and final states. Here n is the amount of gas; k below denotes a polytropic exponent, which the calculator field labels n. They are different quantities.

Ideal gas

PV = nRT

An ideal-gas state with positive absolute pressure, volume and temperature.

Combined gas

P1V1T1 = P2V2T2

Same amount of ideal gas in both states.

Boyle

P1V1 = P2V2

Same amount of gas; constant temperature.

Charles

V1T1 = V2T2

Same amount of gas; constant pressure.

Gay-Lussac

P1T1 = P2T2

Same amount of gas; constant volume.

Avogadro

V1n1 = V2n2

Same temperature and pressure.

Dalton

Pi = xiPtotal   ;   xi = nintotal

Ideal nonreacting mixture; mole fraction from 0 to 1.

Sensible heat

q = mcΔT

Use the relevant approximately constant specific heat and no phase change.

Latent heat

|q| = mL

Energy magnitude for a phase change at the stated conditions.

First law

ΔU = Q − W

Closed system, negligible changes in bulk kinetic and potential energy.

Reversible adiabatic

PVγ = constant

Ideal gas with constant heat-capacity ratio.

Polytropic

PVk = constant

An assumed quasi-static pressure-volume path.

Heat engine

η = WQH = 1 − QCQH

Heat and work magnitudes for a complete cycle.

Carnot limit

ηC = 1 − TCTH

Two reservoirs with positive absolute temperatures; hot greater than cold.

Refrigerator

COPR = QCW

Heat removed from cold space per work input.

Heat pump

COPHP = QHW

Heat delivered to warm space per work input.

Gas states: an equation is not a path

The ideal gas law connects the properties of one state. The combined gas law compares two states for a fixed amount of ideal gas. Neither, by itself, tells you how the gas travelled between those states, so neither gives the expansion work without another process condition.

A gas can reach the same final volume through constant-temperature or insulated reversible expansion and finish at different pressures. In the basic-gas tab, read the changing field labels: Boyle connects pressure and volume; Charles connects volume and temperature; Gay-Lussac connects pressure and temperature; Avogadro connects volume and amount.

For mixtures, a mole fraction of 0.20 means 20% of the molecules, or moles, belong to that component. It is dimensionless. Use either a known mole fraction or component and total moles; a component cannot have more moles than the whole mixture. Ideal-gas behavior becomes less reliable near condensation and at high density.

Sensible heating and phase change

Use sensible heat when temperature changes without a phase change, with the specific heat appropriate to the material and conditions. For gases, constant-pressure and constant-volume heat capacities differ. Cooling gives a negative temperature change and negative heat under the heat-into-system convention.

Latent heat L is a positive magnitude. Choose absorption or release; heat q is positive for absorption and negative for release. The latent-heat formula gives its magnitude. Melting, vaporization and sublimation absorb energy; freezing, condensation and deposition release it. A pure substance changing phase at fixed pressure can remain at its transition temperature. A boiling temperature of 100 °C is not universal: pressure matters.

A multi-stage problem needs multiple terms. Warm solid, melt, warm liquid and vaporize are separate steps with their own properties. Do not apply one specific heat across the entire process.

First law: follow the energy and the signs

A closed system keeps its mass while energy can cross its boundary. The relation below assumes changes in the motion and elevation of the system as a whole are negligible.

ΔU = Q − W

Heat entering gives positive Q. Expansion work done by the system gives positive W. Compression work done on it gives negative W. Thus a compressed insulated gas can gain internal energy even though no heat enters. Textbooks that define work done on the system as positive use a different sign convention; translate the definition before substituting numbers.

Do not apply this simple closed-system balance directly to a flowing compressor or turbine. Those devices generally require mass-flow, enthalpy and other energy terms.

Adiabatic and polytropic processes

Adiabatic means no heat crosses the boundary. The calculator's power-law relations additionally require a reversible ideal-gas process and a constant heat-capacity ratio. Adiabatic alone is not enough: an ideal gas expanding freely into a vacuum can do no work and retain its temperature.

γ = CPCV   ;   T2 = T1(V1V2)γ − 1
W = P1V1 − P2V2γ − 1

The adiabatic work is positive for expansion and negative for compression. Pressure must be in pascals and volume in cubic metres for this product to give joules.

Calculated pressure-volume curves from 200 kPa, 20 litres and 300 kelvin: at 40 litres the isothermal gas has 100 kPa and the reversible adiabatic gas with heat-capacity ratio 1.4 has about 75.8 kPa and 227.4 kelvin.
The two processes share an initial state. The insulated reversible expansion ends cooler; these are calculated model curves, not experimental measurements.

A polytropic path uses a constant exponent k. Integrating pressure along that assumed quasi-static path gives the boundary work. The unitless exponent can be inferred from two distinct-volume states, but identical volumes do not determine a unique exponent.

k = ln(P1P2)ln(V2V1)
W = P2V2 − P1V11 − k   for k ≠ 1
W = P1V1 ln(V2V1)   for k = 1

The second work formula is the logarithmic limit, not division by zero. For a fixed amount of ideal gas, k equal to 1 gives an isothermal path. Zero gives constant pressure. Equal to the heat-capacity ratio gives the reversible adiabatic model.

Efficiency and COP answer different questions

A cyclic heat engine takes heat from a hot source, returns some heat to a colder sink and delivers net work. Its working substance returns to its starting state each cycle. A refrigerator uses work to move heat out of a cold region; a heat pump is judged by the heat delivered to the warm region.

QH = QC + W

COP can exceed 1 because it compares heat moved with work supplied. It is not a heat-engine efficiency. For the same refrigerator/heat-pump cycle, heating COP is one more than cooling COP. The Carnot expression is an ideal two-reservoir upper bound; Celsius ratios cannot be used.

Energy balance diagrams: a heat engine takes 900 joules, rejects 600 joules and delivers 300 joules of work; a refrigerator takes 300 joules of work to move 600 joules from the cold reservoir and deliver 900 joules to the hot reservoir.
These illustrative energy balances give engine efficiency 33.3%, refrigerator COP 2 and heat-pump COP 3. Arrow widths are schematic.

Worked examples

These original examples state their assumptions and round final answers only. Material-property numbers supplied in a question are illustrative inputs, not universal constants.

Example 1: ideal-gas pressure with a litre conversion

A sample contains 0.50 mol of ideal gas at 27 °C in 12 L. Find its absolute pressure using the default SI gas constant.

T = 27 + 273.15 = 300.15 K   ;   V = 0.012 m3
P = nRTV = 0.50 × 8.314462618 × 300.150.012 ≈ 103983 Pa

The answer is about 103.983 kPa absolute. A volume of 12 cubic metres would give an answer a thousand times smaller.

Example 2: combined gas law

A fixed gas sample changes from 120 kPa, 0.030 m3, 300 K to 0.020 m3, 350 K. Find its final pressure.

P2 = P1V1T2T1V2 = 120 × 0.030 × 350300 × 0.020 = 210 kPa

Pressure increases because the gas is both compressed and heated. The pressure unit can remain kPa here because it appears consistently on both sides.

Example 3: Dalton partial pressure

An ideal nonreacting mixture has 0.40 mol of a component in 2.0 mol total at 150 kPa.

xi = 0.402.0 = 0.20
Pi = 0.20 × 150 = 30 kPa

The component contributes 20% of the total pressure. The remaining components together contribute 120 kPa.

Example 4: warming followed by melting

Warm 0.25 kg of ice from −10 °C to 0 °C, then melt it at approximately 1 atm. Take ice specific heat as 2100 J kg−1 K−1 and latent heat of fusion as 334000 J kg−1. Ignore losses.

qwarm = 0.25 × 2100 × 10 = 5250 J
qmelt = 0.25 × 334000 = 83500 J
qtotal = 5250 + 83500 = 88750 J = 88.75 kJ

The melting stage needs energy even though its temperature stays at 0 °C in this model.

Example 5: compression with a sign convention

An insulated closed system receives 400 J of compression work. There is no change in its bulk motion or height.

Q = 0   ;   W = −400 J
ΔU = 0 − (−400) = 400 J

Its internal energy increases. Enter negative 400 in the work-done-by-system field.

Example 6: reversible adiabatic expansion

A model ideal gas starts at 200 kPa, 0.020 m3 and 300 K. It expands reversibly without heat transfer to 0.040 m3, with constant heat-capacity ratio 1.4.

P2 = 200(0.0200.040)1.4 ≈ 75.7858 kPa
T2 = 300(0.0200.040)0.4 ≈ 227.357 K
W = 200000 × 0.020 − 75785.8283 × 0.0401.4 − 1 ≈ 2421.42 J

The work is positive, the gas cools and its internal energy decreases by about 2.421 kJ. Use the computed final pressure, not an unrelated typed value, in the work balance.

Example 7: polytropic work when the exponent is 1

A quasi-static ideal-gas expansion starts at 150 kPa and 0.020 m3, ends at 0.040 m3 and has exponent 1.

P2 = 150(0.0200.040) = 75 kPa
W = 150000 × 0.020 × ln(2) ≈ 2079.44 J

Use the logarithmic expression. Substituting exponent 1 into the other work formula creates an indeterminate division.

Example 8: engine efficiency, COP and the Carnot bound

For a cycle with 900 J from a hot reservoir and 600 J rejected, net work is 300 J.

η = 300900 ≈ 0.3333 = 33.33%

For a refrigerator that instead removes 600 J using 300 J of work, cooling COP is 2. It delivers 900 J to the warm side, so heating COP is 3.

COPR = 600300 = 2   ;   COPHP = 900300 = 3

A separate ideal two-reservoir engine operating between 600 K and 300 K has a 50% Carnot limit.

ηC = 1 − 300600 = 0.50 = 50%

Practice, then check your answer

  1. Convert 35 °C to kelvin and 2.5 L to cubic metres.

    Answer 1
    T = 35 + 273.15 = 308.15 K
    V = 2.5 × 0.001 = 0.0025 m3
  2. A fixed-temperature gas has 180 kPa at 0.010 m3. Find the volume at 120 kPa.

    Answer 2
    V2 = 180 × 0.010120 = 0.015 m3

    The pressure falls to two thirds; volume grows by a factor of 1.5.

  3. At fixed pressure, a sample has volume 4.0 L at 300 K. Find the volume at 360 K.

    Answer 3
    V2 = 4.0 × 360300 = 4.8 L
  4. At fixed volume, pressure is 100 kPa at 27 °C. Find it at 87 °C.

    Answer 4
    P2 = 100 × 360.15300.15 ≈ 119.99 kPa

    Convert both temperatures to kelvin before taking their ratio.

  5. At fixed temperature and pressure, 0.50 mol occupies 12 L. What volume does 0.75 mol occupy?

    Answer 5
    V2 = 12 × 0.750.50 = 18 L
  6. A component has partial pressure 24 kPa in an ideal mixture at 120 kPa. Find its mole fraction.

    Answer 6
    xi = 24120 = 0.20

    The mole fraction is dimensionless, equivalent to 20%.

  7. Cool 0.80 kg of a material from 50 °C to 20 °C. Take its constant specific heat as 900 J kg−1 K−1. Find heat into the material.

    Answer 7
    q = 0.80 × 900 × (20 − 50) = −21600 J

    The material releases 21.6 kJ.

  8. Freeze 0.10 kg of a substance with latent heat 334000 J kg−1 at its freezing point. Find the energy magnitude and direction.

    Answer 8
    |q| = 0.10 × 334000 = 33400 J

    33.4 kJ is released. Heat into the substance is negative.

  9. A closed system absorbs 1200 J and does 450 J of work. Find the internal-energy change.

    Answer 9
    ΔU = 1200 − 450 = 750 J
  10. A cyclic engine receives 2400 J and rejects 1500 J. Find its work and efficiency.

    Answer 10
    W = 2400 − 1500 = 900 J
    η = 9002400 = 0.375 = 37.5%

Checks that catch common mistakes

  • Kelvin is not optional for ratios. Twice 20 °C is not twice its absolute temperature. Use 293.15 K before applying a gas-law ratio.
  • Gauge pressure is not absolute pressure. Zero on a gauge usually does not mean a vacuum.
  • A blank is not zero. Zero heat or zero work can be meaningful; a missing required value is different.
  • The selected unknown is calculated. Do not try to force a second inconsistent final state into an adiabatic or polytropic result.
  • An energy amount is not power. Joules measure energy; watts measure joules per second. Use the BTU per hour to kilowatt converter when converting a heat-transfer rate.
  • Mass and amount are distinct. Kilograms and moles need a molar mass to connect them. The stoichiometry guide explains how amount enters chemical calculations.
  • State values cannot determine a missing path. Work depends on the process, not only on the endpoints.
  • More decimal places do not improve a model. Round in line with the input data and assumptions. Use the scientific calculator to check arithmetic independently.

Frequently asked questions

Can I enter Celsius?

Yes, select Celsius for temperature inputs. Gas-law and Carnot calculations use converted absolute temperatures. A temperature difference of 1 °C has the same size as 1 K.

Is every adiabatic process described by the power law?

No. The calculator assumes reversible ideal-gas behavior with constant heat-capacity ratio. Free expansion into a vacuum is an example where adiabatic alone does not justify that relation.

Why does a COP above 1 make sense?

A refrigerator or heat pump moves heat as well as consuming work. Its useful heat transfer can therefore exceed the work input; the complete energy balance still holds.

Can this calculate real steam or refrigerant properties?

No. Phase-dependent and real-fluid properties require appropriate property tables or a validated equation of state. The supplied heat-capacity and latent-heat numbers are inputs, not a property database.

Why does the calculator use absolute pressure?

Ideal-gas state relations use pressure relative to vacuum. A gauge reports pressure relative to its reference, usually the local atmosphere, and needs the appropriate offset.

Does the pressure-volume graph show measured data?

No. It shows states or a curve calculated from the stated model. A combined gas-law pair does not define a path or its work.

Sources & References

Physics relationships and unit conventions checked on 6 October 2026. Explanations, examples, questions and diagrams on this page are original. The polytropic work formula is obtained by integrating the stated pressure-volume relation; no external exercise or illustration is reproduced.

Shares:

Related Posts