Entropy is kept two ways in this lab, and they agree. Above, heat crosses between two reservoirs and the ledger is totted up in joules per kelvin: S = Q / T on each side, with only the total deciding whether the process is allowed. Below, the same quantity is counted instead of measured, S = k ln W, one bar for every way N particles can share a two-sided box.
Two faces of the same quantity. Above, heat moves between two reservoirs and the entropy ledger is kept in J/K — one side loses, the other gains, and only the total decides whether the process is allowed. Below, the same idea counted out: every way N particles can sit in a two-sided box, with the fattest macrostate marked.

The entropy simulator is a free interactive physics lab that runs in your browser — nothing to install and no sign-up. Slide the heat and both reservoir temperatures to watch the entropy ledger, and see S = k ln W count microstates live. It reports total entropy change, hot side — entropy change, cold side — entropy change and total microstates as you drag the sliders.
| Control | Range | Step |
|---|---|---|
| Heat transferred | 10 – 2000 J | 10 |
| Hot reservoir temperature | 200 – 1000 K | 5 |
| Cold reservoir temperature | 50 – 1000 K | 5 |
| Number of particles in the two-sided box | 2 – 24 | 1 |
Four sliders and one button drive the lab. Heat transferred Q sets how many joules make the trip; since entropy is heat divided by temperature, it simply scales the whole ledger. The temperature sliders are the interesting ones. Thot sits under the hot side's loss, so raising it makes that loss smaller and pushes the total up. Tcold sits under the cold side's gain, so raising it shrinks the gain and drags the total down. The cold reservoir is held one kelvin below the hot one, and the panel shows the held value rather than the one you asked for.
Now push Tcold up towards Thot and watch the third bar. Loss and gain grow closer in size until they nearly cancel, and the total collapses towards nothing. That is the reversible limit, and it is worth sitting with: heat is still crossing, joule for joule, but almost no entropy is being made. The temperature gap generates entropy, not the heat. Press Reverse the flow and the signs swap, the total goes negative, and the verdict turns to forbidden — the same accounting that caps the Carnot efficiency of a heat engine.
The strip along the bottom answers a different question with the same word. Each bar counts arrangements: with N particles loose in a two-sided box, how many ways put k of them on the left? The even split is highlighted because it always wins, and raising Particle count N shows how decisively. At N = 4 the peak has six arrangements out of sixteen; at N = 24 it has 2,704,156 out of 16,777,216, and the ends have shrivelled to slivers. Feed that count through S = k ln W and out comes an entropy in the same joules per kelvin the ledger uses.
That is where the usual gloss falls down. Nothing in the strip measures disorder or mess — it counts, and nothing else. A lopsided arrangement is not forbidden and is no tidier; there are simply far fewer ways to build one. The logarithm turns that count into a number you can add and subtract, which is why the two halves of this lab are one piece of bookkeeping seen from opposite ends, as the laws of thermodynamics tie them. For your own figures without the sliders, the entropy change calculator writes the substitution out.
Because the two halves of the ledger cancel. The hot side loses Q/T_hot and the cold side gains Q/T_cold, so the total is Q multiplied by (1/T_cold - 1/T_hot). When the two temperatures match, those two fractions are identical and the bracket is zero, no matter how large Q is. That is the reversible limit: heat still moves, but no entropy is created. Every real, spontaneous transfer needs a genuine temperature gap, and the wider the gap the more entropy the transfer generates. The simulator holds the cold reservoir one kelvin below the hot one so the division always stays defined, and reports the reversible limit once the remaining gap is small enough that the net is under one per cent of either side.
Each bar is one macrostate: a way of saying how many of the N particles are in the left half of the box. The bar's height is the number of distinct arrangements that produce it, which is the binomial coefficient C(N, k). The strip therefore shows the whole distribution at once, with the even split highlighted because it is always the tallest. Add particles and the middle bar pulls further ahead of the ends, which is why a gas spreads out: the balanced arrangement is not preferred by any force, it simply has overwhelmingly more ways of happening than the lopsided one.
Because the same joules are divided by a smaller number. Entropy change is heat divided by temperature, so one joule delivered at 300 K buys more entropy than one joule removed at 500 K. The cold reservoir is always the lower temperature in this lab, so its gain always outweighs the hot side's loss and the total comes out positive. This is the second law in arithmetic form, and it is why the total bar in the simulator sits on the positive side of the zero line for every forward transfer.
Yes, within its assumptions. It models two reservoirs so large that moving Q joules does not change either temperature, which is the standard textbook setup, and it reports each entropy change to three significant figures. If your problem involves a body that warms or cools as heat arrives, the temperature is not constant and you need the integral form instead, so the numbers here will not match. For a single transfer at a fixed temperature you can also work the same figures through the entropy change calculator, which shows the substitution step by step.