Home / Mechanical Engineering / Thermodynamics / First Law of Thermodynamics (Energy Balance)

Formula & Calculator

First Law of Thermodynamics (Energy Balance)

This is the law of conservation of energy for a closed system. It says the change in internal energy equals the heat added minus the work done by the system. In plain words: energy cannot be created or destroyed, only converted. For example, if you add 100 J of heat to a gas and it does 40 J of work, its internal energy rises by 60 J. It is the foundation of all thermodynamics, from engines to refrigerators.

Mechanical Engineering Thermodynamics Calculator
VORZEP · THERMODYNAMICS & ENERGY TOOLS

First Law of Thermodynamics Calculator

Solve the classic energy-balance relation ΔU = Q − W for any of its three unknowns — internal energy change, heat transferred or work done — with three-way solving, sign-convention toggle, a live system schematic, and companion energy metrics.

ΔU = Q − W · Q + when heat in · W + when work out by system
Solve for
Sign convention Physics (IUPAC) convention — W is work done BY the system. Heat in and work out are positive.
Internal Energy Change (ΔU) Change in the total microscopic energy of the system — kinetic and potential energy of its molecules. Positive ΔU means the system has gained internal energy (warmer, more excited); negative means it has lost energy. For an ideal gas, ΔU = m·cv·ΔT, so a positive ΔU corresponds to a temperature rise at constant volume. Expressed in kilojoules.
kJ
Internal energy change must be a finite number.
= 500.0 kJ = 500,000 J = +500 kJ (system gained energy)
Heat Transferred (Q) Energy transferred between the system and its surroundings due to a temperature difference. In the physics convention: Q is positive when heat flows INTO the system (endothermic from the system's point of view), negative when heat flows OUT. Typical: a few kJ for a small experiment, 100–10,000 kJ for a domestic process, millions of kJ for industrial furnaces and power plants. Q = 0 for a perfectly insulated (adiabatic) system.
kJ
Heat must be a finite number.
= 800.0 kJ = heat in (+) = 800,000 J
Work Done (W) Energy transferred as a result of a force acting through a distance — typically expansion or compression work in a thermodynamic system. In the physics convention: W is positive when the SYSTEM does work on the surroundings (expansion, lifting a weight, driving a piston out), negative when work is done ON the system (compression). For a reversible process, W = ∫P dV. W = 0 for a rigid constant-volume system. Expressed in kilojoules.
kJ
Work must be a finite number.
= 300.0 kJ = work out by system (+) = 300,000 J
INTERNAL ENERGY CHANGE (ΔU)
500.0 kJ
Q 800 kJ · W 300 kJ · ΔU = Q − W = 500 kJ · endothermic expansion
NET ENERGY GAIN — SYSTEM WARMED AND EXPANDED
ΔU = Q − W
Step-by-step solution
Energy balance vs. work
Current Q Q × 0.5 Q × 1.5
Energy balance vs. heat
Current W W × 0.5 W × 1.5
Sensitivity
Companion thermodynamic metrics mass m kg cv kJ/kg·K
Energy balance around a thermodynamic system — live schematic
SURROUNDINGS · ENERGY BALANCE · ΔU = Q − W SYSTEM mass m · internal energy U ΔU (internal energy change) +500 kJ Q = 800 kJ heat IN W = 300 kJ work OUT ΔU = Q − W = 800 kJ − 300 kJ = 500 kJ net energy gain of 500 kJ → system warmed up and did useful work
Heat Q transferred into the system (positive) Work W done by the system on the surroundings (positive) Net internal energy change ΔU = Q − W
What the First Law energy balance really measures
ΔUinternal energy change
=
Qheat in (+)
−
Wwork out (+)

Energy is conserved — it just changes form

The First Law is the thermodynamic statement of the conservation of energy. In an isolated system, the total energy never changes; in a system that exchanges energy with its surroundings, the change in internal energy is exactly balanced by the heat added and the work done. Any joule of energy that appears in the system must have come in as heat or as work, and any joule that leaves must leave the same way. The formula ΔU = Q − W is the complete accounting: it says that the books must balance, and no energy is created or destroyed in the process.

Sign conventions matter — two are in common use

The physics (IUPAC) convention, used throughout this calculator by default, defines Q as positive when heat flows into the system and W as positive when the system does work on the surroundings. The relation is then ΔU = Q − W. The chemistry convention reverses the sign of W: work done ON the system is positive, so the relation becomes ΔU = Q + W. Both are mathematically equivalent; the difference is only bookkeeping. Almost every collision between students and textbooks in thermodynamics comes from a mismatch of sign conventions. This calculator makes the choice explicit and shows both.

Heat and work are both forms of energy transfer — not stored energy

The most subtle aspect of the First Law is the distinction between state functions (like U, T, P, V) and path functions (like Q and W). Internal energy U is a property of the state of the system — its value depends only on the current temperature, pressure and composition. Heat and work, in contrast, are not stored in the system — they are energies in transit across the boundary. They describe the process by which energy is transferred, not a quantity held by the system. This is why we write ΔU but we do not write ΔQ or ΔW: Q and W are only defined for a process, not for a state.

It applies to every energy conversion in the universe

The First Law is universal. It holds for steam engines, jet engines, refrigerators, biological cells, stars and chemical reactions. It is the framework within which all energy analysis is done, from a laboratory calorimeter to a nuclear power plant. Whenever a device appears to violate the First Law — a perpetual motion machine of the first kind — we know with certainty that it will not work, not because of friction or inefficiency but because the law itself forbids it. This absolute status is what makes the First Law one of the most powerful and most trusted principles in all of physics.

How to Use This Calculator

The First Law energy balance links three quantities: ΔU, Q and W. Pick which one you want the tool to solve, then fill in the other two.

1. Choose what to solve for

Pick ΔU, Q or W from the toggle. The calculator rearranges ΔU = Q − W automatically for whichever variable you choose.

2. Pick your sign convention

Physics/IUPAC convention: heat in and work out are positive, so ΔU = Q − W. Chemistry convention: heat in and work in are positive, so ΔU = Q + W. Both are valid — the calculator shows which is active and updates the formula label everywhere.

3. Use realistic presets

Presets cover positive, zero and negative values for all three quantities — spanning isothermal, adiabatic, isochoric and general processes. Values range from −100,000 kJ to +100,000 kJ, so you can model everything from a small calorimeter experiment to a large industrial furnace.

4. Read the result and verdict

The result card shows the solved value with its physical interpretation — whether the system gained or lost internal energy, whether it was heated or cooled, whether it expanded or was compressed. A colour-coded verdict classifies the process from strong cooling through adiabatic, mild and moderate up to strong heating.

5. Check the schematic and charts

The schematic shows the system box surrounded by the environment, with a heat arrow coming in from the top and a work arrow going out to the right, plus a live readout of ΔU in the centre. The main chart plots ΔU against work for three heat values.

6. Switch to Advanced for depth

Advanced mode adds a ΔU vs. heat chart, a sensitivity analysis, and companion thermodynamic metrics — equivalent temperature change (for a given mass and cv), enthalpy change, entropy-related quantities, Carnot efficiency if the process is cyclic, and efficiency indicators.

What This Tool Offers

Built around the classic First Law energy balance ΔU = Q − W, the fundamental link between heat, work and internal energy in any thermodynamic system.

Three-way solving

Solve for internal energy change, heat transferred, or work done. The calculator rearranges the formula for whichever variable you choose.

Both sign conventions

Toggle between physics/IUPAC (ΔU = Q − W) and chemistry (ΔU = Q + W) sign conventions — the calculator updates every label, step and diagram accordingly.

Live system schematic

A box representing the system surrounded by the environment, with heat and work arrows whose thickness scales with the magnitudes, plus a live ΔU readout in the centre.

Process verdict

Each result is classified from strong cooling through adiabatic, mild, moderate and strong heating, with a note on whether the system did work or had work done on it.

Companion thermodynamic metrics

Equivalent temperature change (from mass and cv), enthalpy change, entropy-related quantity, isentropic efficiency, and process classification — all live.

Reference tables

A ΔU lookup grid across Q and W, a table of typical processes (isothermal, adiabatic, isochoric, isobaric), and a full variable reference.

Reference Tables & Conversions

A quick three-field solver, a ΔU lookup grid, and typical thermodynamic process comparison.

Quick First Law solver — enter any two, read the third

kJ
kJ
kJ
= ΔU 500.0 kJ · Q 800.0 kJ · W 300.0 kJ · net energy gain 500 kJ

ΔU Lookup — Q vs. W (Physics Convention)

Computed from ΔU = Q − W. Values in kJ.

Q (kJ)W=−1000W=−500W=0W=500W=1000W=2000

Four Standard Thermodynamic Processes

Each of the four classic processes constrains one of the three energy-balance quantities in a specific way. The First Law shows how the other two must adjust.

ProcessConstraintFirst Law formPhysical exampleNotes
IsothermalΔT = 0ΔU = 0 → Q = WSlow expansion of an ideal gasAll heat added is converted to work
AdiabaticQ = 0ΔU = −WFast compression, insulated cylinderWork done ON system raises U and T
IsochoricW = 0ΔU = QHeating a rigid sealed tankAll heat added becomes internal energy
IsobaricP = constΔU = Q − P·ΔVPiston with fixed weightHeat splits between ΔU and expansion work

Variable Reference

SymbolMeaningTypical rangeUnits
ΔUInternal energy change−10⁶ – 10⁶kJ
QHeat transferred−10⁶ – 10⁶kJ
WWork done by system−10⁶ – 10⁶kJ
mSystem mass0.001 – 10⁶kg
cvSpecific heat at constant volume0.5 – 5kJ/kg·K
ΔTTemperature change = ΔU / (m·cv)—K
ΔHEnthalpy change = ΔU + P·ΔV—kJ
γSpecific heat ratio cp/cv1.1 – 1.7—

What Does ΔU = Q − W Measure?

The First Law of Thermodynamics states that the change in internal energy of a closed system equals the heat added to the system minus the work done by the system. It is the thermodynamic statement of the conservation of energy, and it is the single most important equation in thermodynamics. Every energy analysis — from a domestic refrigerator to a jet engine, from a chemical reaction to a nuclear reactor — is built on this balance. The formula says that energy can be transferred between the system and its surroundings in exactly two ways: as heat or as work. It cannot be created or destroyed, and it cannot appear or disappear without crossing the boundary.

The quantities involved each have a precise meaning. Internal energy U is the sum of all the microscopic kinetic and potential energies of the molecules that make up the system — thermal motion, chemical bonds, intermolecular forces, and so on. Heat Q is energy transferred due to a temperature difference across the boundary. Work W is energy transferred when a force acts through a distance — typically the expansion or compression of a gas against a piston, but also shaft work, electrical work, and surface work. The signs of Q and W are always defined by convention, and the choice of convention is arbitrary as long as it is applied consistently.

First Law Formula

The defining relationship in the physics (IUPAC) convention is:

ΔU = Q − W

In the chemistry convention, where work done ON the system is positive:

ΔU = Q + W

Rearranged to solve for the other two unknowns (physics convention):

Q = ΔU + W
W = Q − ΔU

For specific processes, the First Law simplifies:

Adiabatic (Q = 0):  ΔU = −W
Isochoric (W = 0):  ΔU = Q
Isothermal ideal gas (ΔU = 0):  Q = W
Isobaric:  ΔU = Q − P·ΔV  or  Q = ΔH

For an ideal gas, internal energy change depends only on temperature:

ΔU = m · cv · ΔT   (ideal gas)

First Law Variables

SymbolMeaningNotes
ΔUInternal energy changeState function; depends only on initial and final states
QHeat transferredPath function; positive when heat flows in (physics convention)
WWork done by systemPath function; positive when system does work (physics convention)
UInternal energySum of all microscopic energies; a state function
HEnthalpy = U + PVState function; ΔH = Q for an isobaric process
mSystem massUsed with cv to compute ΔU from ΔT
cvSpecific heat at constant volumeProperty of the working fluid; 0.718 kJ/kg·K for air
ΔTTemperature change= ΔU / (m·cv) for an ideal gas

How Each Variable Affects the Result

The First Law is a simple linear equation: ΔU increases by 1 kJ when Q increases by 1 kJ, and decreases by 1 kJ when W increases by 1 kJ. This makes the relationship very easy to reason about, but the physical consequences are far richer than the algebra suggests. Because Q and W are independent of each other in general (they depend on the path taken, not just on the endpoints), the same change in internal energy ΔU can be achieved by many different combinations of heat and work. A gas can be warmed by adding heat at constant volume (Q > 0, W = 0), or by compressing it adiabatically (Q = 0, W < 0), and the final ΔU can be the same. This path independence of ΔU — and path dependence of Q and W individually — is the deepest insight of the First Law.

Sign conventions matter. With the physics convention (used here by default), heat in and work out are positive. In an adiabatic compression, Q = 0 and W is negative (work done on system), so ΔU = −W is positive — the gas warms up. In an adiabatic expansion, W is positive and ΔU is negative — the gas cools down. In an isothermal process, ΔU = 0, so Q = W: all the heat added is converted to work, and the temperature stays constant. The Four Process table above shows how each classic process constrains one of the three variables.

In practice, the First Law is applied in two opposite directions. Engineers use it forward: given the heat added and the work done, compute how much the system's internal energy changes — useful for predicting temperature rise, pressure change or the required cooling load. Scientists often use it in reverse: measure ΔU directly (from a temperature change), measure Q or W independently, and infer the other one. The First Law is thus both a predictive tool and a consistency check — any measurement that appears to violate it is a signal that some energy transfer has been overlooked.

First Law Calculation Examples

Given: Q = 800 kJ (heat in), W = 300 kJ (work out) — solve for ΔU
ΔU = 800 − 300 = 500 kJ (system gained internal energy)
Given: ΔU = 500 kJ, W = 300 kJ — solve for Q (physics convention)
Q = ΔU + W = 500 + 300 = 800 kJ (heat added)
Given: ΔU = 500 kJ, Q = 800 kJ — solve for W (physics convention)
W = Q − ΔU = 800 − 500 = 300 kJ (work done by system)
Adiabatic compression: Q = 0, W = −200 kJ (work done on system)
ΔU = 0 − (−200) = +200 kJ (system warms up)
Isothermal expansion: ΔU = 0, W = 500 kJ (work out)
Q = ΔU + W = 0 + 500 = 500 kJ (heat added to maintain T)

Frequently Asked Questions

Because two different scientific communities formalised thermodynamics at roughly the same time with different historical choices. Physics and engineering (and now the IUPAC standard) define W as work done BY the system — expansion work is positive because it pushes outward on the surroundings, doing something useful. Chemistry defines W as work done ON the system — compression work is positive because it is what the chemist does to the reaction vessel. Both are internally consistent; both lead to the same physics. The confusion only arises when someone forgets which convention a particular textbook, formula or problem is using. This calculator makes the convention explicit and toggles between them, so you can use whichever one matches your context. Rule of thumb: if you're studying mechanical engineering or physics, use ΔU = Q − W; if you're studying chemistry or biology, use ΔU = Q + W.

Internal energy is a property of the system — a quantity stored in the microscopic motion and interactions of the molecules, and dependent only on the state (temperature, pressure, composition) of the system. Heat is a process — energy in transit across the boundary due to a temperature difference. Two systems can have the same internal energy but reach it via completely different amounts of heat, because heat is path-dependent. This is why we write ΔU (with the delta, because U is a state function) but we write Q (without a delta, because Q is not a property of any state). The distinction is one of the most conceptually difficult in thermodynamics and one of the most important.

Yes, and negative values are physically meaningful. In the physics convention, negative Q means heat is flowing OUT of the system (cooling, condensation, heat rejection to the environment) and negative W means work is being done ON the system (compression, shaft work input, lifting a weight that pulls a piston back). Both negative values are common in real processes: a refrigerator has Q < 0 (heat extracted from the cold reservoir is dumped outside), and a compressor has W < 0 (work input compresses the gas). The sign is not a sign of "badness" — it simply indicates the direction of the energy flow relative to the system boundary. Getting the signs right is the single most important skill in thermodynamic problem-solving.

The First Law says that energy is conserved — the books always balance. But it says nothing about which direction a process can spontaneously go. A cup of hot coffee cooling to room temperature conserves energy (heat lost by the coffee equals heat gained by the air), and so does the reverse (room-temperature coffee spontaneously heating up while the air cools), but the reverse never happens. The Second Law explains why: entropy of an isolated system never decreases. It is the Second Law that tells us heat flows from hot to cold, that perpetual motion of the second kind is impossible, and that no engine can convert heat to work with 100 % efficiency. The First Law sets the energy budget; the Second Law sets the direction and the efficiency.

For an open system (control volume) with mass flowing in and out, the First Law is extended to include the energy carried by the flowing streams. The general form is: dEcv/dt = Q̇ − Ẇ + Σ ṁin(h + v²/2 + gz)in − Σ ṁout(h + v²/2 + gz)out, where h is the specific enthalpy, v is velocity, z is elevation, and ṁ is mass flow rate. In steady state with negligible kinetic and potential energy changes, this reduces to Q̇ − Ẇ = ṁ(hout − hin), which is the working equation for most engineering equipment — turbines, compressors, heat exchangers, nozzles and boilers. This calculator handles the closed-system form; for open systems the same principles apply but the enthalpy term enters explicitly.

Because internal energy depends only on the current state of the system — its temperature, pressure and composition — not on how it got there. Heat, by contrast, depends on the specific path taken through intermediate states. Consider two ways of heating water from 20 °C to 80 °C: (1) heat it directly with a flame, or (2) heat it to 100 °C and cool it back down. In both cases the final state is identical, so ΔU is the same. But the total heat added is different in the two paths (the second path added and removed extra heat), so Q is path-dependent. This is why ΔU is written with a delta (it is a difference of a state function) while Q and W are written without one (they are not differences of any state function). Mathematically, dU is an exact differential while đQ and đW are inexact differentials.

1 kJ = 1,000 J. 1 MJ = 1,000 kJ = 10⁶ J. 1 kWh = 3,600 kJ. 1 BTU = 1.055 kJ. 1 cal = 4.184 J, and 1 kcal = 4.184 kJ (the "Calorie" on food labels). For specific energy per unit mass, 1 kJ/kg = 1,000 J/kg and 1 BTU/lb = 2.326 kJ/kg. For pressure–volume work, 1 kJ = 1 kPa·m³ = 1 bar·L/10. These conversions come up constantly in thermodynamics: a domestic gas bill might be measured in kWh, a jet engine analysis in kJ/kg, and a chemical reaction enthalpy in kJ/mol. Being fluent in the conversions is essential for working across disciplines.

A perpetual motion machine of the first kind is a hypothetical device that produces more energy output than it takes in — a machine that creates energy from nothing. The First Law forbids this categorically: no process can output more energy than it receives, because that would mean creating energy from nothing. A perpetual motion machine of the second kind, by contrast, is a device that converts heat entirely to work with no waste heat — it obeys the First Law (the energy books balance) but violates the Second Law (it would require zero entropy production). Both classes of machine have been proposed throughout history, and both are impossible. The First Law's prohibition on the first kind is the stronger of the two: it is an absolute conservation law that has never been observed to fail in any experiment ever performed.

Calculating...

Variables

Symbol Quantity Unit
delta_U Change in internal energy kJ
Q Heat added to the system kJ
W Work done by the system kJ

What it means

The first law of thermodynamics is the application of energy conservation to thermodynamic systems. For a closed system (no mass transfer), the change in internal energy ΔU is equal to the net heat added to the system Q minus the work done by the system W: ΔU = Q − W. This equation is the cornerstone of thermal engineering. It is used to analyze heat engines, refrigerators, and compressors. The sign convention: positive Q is heat added to the system, positive W is work done by the system. The internal energy U is a state function, so its change depends only on the initial and final states. The first law can also be written in rate form for steady‑flow devices: Q̇ − Ẇ = ṁ Δh + ΔKE + ΔPE. This law enables calculation of energy efficiency and is essential for designing power plants, HVAC systems, and combustion processes. It is also the basis for the energy balance in chemical reactions.

Worked example

First Law (Energy Balance) – Two Examples

Real‑World
Scenario 1 – Steam Boiler: Heat added Q=500 kJ, work done by system W=200 kJ. Find ΔU.
ParameterValue
Q+500 kJ
W+200 kJ
1ΔU = Q − W = 500−200 = 300 kJ
ResultΔU = 300 kJ✓ increase
Scenario 2 – Refrigerator: Work input 100 kJ, heat removed from cold space Q_c=200 kJ. Find heat rejected to hot space (energy balance).
ParameterValue
W_in100 kJ
Q_c200 kJ
1By energy balance: Q_h = Q_c + W_in = 200 + 100 = 300 kJ
ResultQ_h = 300 kJ✓ rejected
Key insight: The first law is about conservation of energy – it's a balance equation.

Common mistakes

  • Sign convention (same as ID 15): Q positive when added, W positive when done by the system.
  • Work “on” vs “by”: Be consistent with your textbook – some use ΔU = Q + W (work on).
  • Closed system: This form does not include flow work; for open systems, use enthalpy.
  • ΔU for ideal gas: Only temperature dependent; for real gases, volume/pressure also matter.
  • Heat transfer vs. temperature: Q is energy, not temperature.

Applications

The first law of thermodynamics (energy balance) states that the change in internal energy of a system equals heat added minus work done. This principle is the bedrock of thermal engineering, used in the analysis of engines, turbines, compressors, and heat pumps. It enables engineers to perform energy audits, optimise fuel consumption, and design efficient thermal systems. In power plants, it is used to calculate the efficiency of steam and gas cycles. In refrigeration, it determines the coefficient of performance. The law also applies to chemical processes, where energy balances are essential for reactor design and safety. By applying the first law, engineers can identify energy losses and improve the overall performance of thermal systems.

  • Power plant cycle analysis (Rankine, Brayton)
  • HVAC system design and performance evaluation
  • Chemical reactor energy balance
  • Internal combustion engine heat loss analysis
  • Energy storage system design

Suggest an improvement

Found a mistake? Have a better example? Let us know.
You may send up to 3 suggestions per 24 hours.

Page details

1,520

Views
  • Published July 12, 2026
  • Last updated August 13, 2026