First Law of Thermodynamics Calculator

Compute unknown thermodynamic quantity (Change in Internal Energy, Heat Transfer, or Work Done) using the energy conservation principle.

Sign convention: Q > 0 if heat added to system, W > 0 if work done BY system.
Isochoric (V=const): Q = ΔU, W = 0
Isobaric (P=const): Q = ΔU + PΔV
Isothermal (Ideal Gas): ΔU = 0, Q = W
Adiabatic: Q = 0, ΔU = -W
Generic: ΔU = 500 J, Q = 800 J
Privacy first: Local calculations only – no data transmitted.
Heat (Q) into system
Work (W) out of system
Internal Energy (ΔU)

The First Law of Thermodynamics: Energy Conservation

The First Law of Thermodynamics is a formulation of the principle of energy conservation for thermodynamic systems. It states that the increase in internal energy of a closed system equals the heat added to the system minus the work done by the system: ΔU = Q – W. This law bridges heat transfer and mechanical work, establishing that energy cannot be created or destroyed — only converted from one form to another.

ΔU = Q − W

Where: ΔU = Internal energy change [J], Q = Net heat transfer [J], W = Work done by system [J]

Historical Foundations & Scientific Authority

Pioneering work by James Prescott Joule, Julius Robert von Mayer, and Hermann von Helmholtz in the 1840s established the equivalence between heat and work. Joule's paddle-wheel experiment demonstrated that mechanical work can be converted into heat, proving the mechanical equivalent of heat. The First Law formally rejects the possibility of a perpetual motion machine of the first kind (a device producing work without energy input). Today, it is fundamental to engine design, refrigeration cycles, chemical reactions, and atmospheric science.

How to Use the Calculator

  1. Select the unknown variable (ΔU, Q, or W) from the dropdown.
  2. Enter the two known quantities (numeric values in Joules). Respect sign conventions: Positive Q for heat entering the system; Positive W for work done by the system.
  3. Click “Calculate & Solve” — the tool solves the first law equation algebraically.
  4. View the step-by-step derivation and the result with full precision.
  5. Use preset thermodynamic processes (isochoric, isobaric, etc.) to load typical scenarios. If you are unsure about sign conventions, click the "Generic" example: ΔU = 500 J, Q = 800 J – the calculator will automatically solve for W = 300 J, demonstrating the correct arithmetic.

Process-Based Examples & Real Applications

Process Constraint First Law Simplification Engineering Example
Isochoric Constant volume → W = 0 ΔU = Q Heating gas in a rigid container (engine cylinder at top dead center).
Isobaric Constant pressure Q = ΔU + PΔV Boiling water, piston-cylinder with constant load. e.g., ΔU = 200 J, W = 80 J → Q = 280 J.
Isothermal (ideal gas) ΔU = 0 (ideal gas only) Q = W Slow expansion/compression in contact with heat reservoir.
Adiabatic Q = 0 ΔU = –W Rapid expansion in a gas turbine, compression stroke in diesel engines.
Case Study: Otto Cycle (Gasoline Engine)

During the power stroke, hot gases expand nearly adiabatically (Q ≈ 0). If the gas does 750 J of work on the piston, the internal energy decreases by 750 J (ΔU = –W). This converted energy becomes mechanical work propelling the vehicle. Using our calculator: set unknown ΔU, Q = 0, W = 750 J → ΔU = –750 J, confirming energy conservation. Design of thermal efficiency directly depends on this principle.

Step-by-Step Derivation & Sign Conventions

From ΔU = Q – W, solving for any unknown is straightforward algebra:

  • If ΔU is unknown: ΔU = Q – W.
  • If Q is unknown: Q = ΔU + W.
  • If W is unknown: W = Q – ΔU.

⚠️ Important: Many textbooks use the sign convention “W = work done BY system”. Some engineering contexts may define W as work done ON system. Our calculator follows the IUPAC/IUPAP convention: ΔU = Q – W (W > 0 means system does work on surroundings). If your problem uses opposite sign, simply invert the sign of W accordingly.

Ideal Gas Internal Energy: For an ideal monatomic gas, ΔU = (3/2)nR ΔT. For diatomic, ΔU = (5/2)nR ΔT. Combined with first law, you can derive temperature changes or heat capacity.

Common Misconceptions & Pitfalls

  • ΔU depends only on temperature for ideal gases – true, but for real substances it depends on both T and V.
  • Q and W are path-dependent while ΔU is state function. Even though Q and W vary with path, their difference Q – W gives the same ΔU for any path between two equilibrium states – a direct test of energy conservation.
  • Negative internal energy change indicates cooling or depressurization.

Advanced Topics: Open Systems & Enthalpy

For open systems (mass flow across boundaries), the First Law extends to include flow work and enthalpy. The steady-flow energy equation (SFEE) is: Q – W = ṁ(h₂ – h₁ + ½Δv² + gΔz). Our calculator focuses on closed systems, but the fundamental conservation principle remains identical. For steady‑flow devices (turbines, compressors, nozzles), the same calculator can be used if you substitute ΔU with ΔH (enthalpy change) and include kinetic/potential energy corrections where needed.

Expert review & academic alignment – This tool is validated against standard thermodynamics textbooks (Çengel & Boles, Moran & Shapiro) and follows the NIST conventions for energy units. The numerical engine uses double-precision arithmetic. Last accuracy audit: April 2026 by GetZenQuery Tech Team.

Frequently Asked Questions

Chemistry often uses ΔU = Q + W, where W = work done ON the system. Our calculator uses the physics/engineering convention ΔU = Q – W. Always verify your textbook's sign rule.

Yes, but careful: latent heat adds energy without temperature change. Use Q = m·L, and if volume change occurs, work is PΔV. The first law always holds.

Inputs are in Joules (J) by default, but 1 kJ = 1000 J. You can enter 5000 for 5 kJ, and result will be in J. We recommend consistent units.

High numeric precision (up to 10 decimal places) using JavaScript's 64-bit floating point. Suitable for academic and professional use.

Floating-point errors are below 1e‑12 relative. All results are truncated to 6 decimal places, far beyond typical experimental precision. The solver uses analytic algebra, not iterative methods, so error is negligible.
References: NASA Thermodynamics | Çengel, Y.A. & Boles, M.A. “Thermodynamics: An Engineering Approach” (9th Ed) | NIST Thermodynamics