Getting Onsager's critical temperature out of a 4 × 4 Ising lattice

A 2025 paper extrapolates the heat-capacity peak of exactly solved finite Ising lattices to the infinite one. With fibub's exact enumeration, two tiny lattices already land within 1 % of the exact Tc.

The two-dimensional Ising model is the one interacting system whose phase transition we know exactly: Onsager solved it in 1944, and the critical temperature of the infinite square lattice is Tc = 2/ln(1 + √2) = 2.269185 in units of J/k_B. Finite lattices have no sharp transition at all; their heat capacity has a rounded peak, and that peak sits above Tc. A 2025 paper in Entropy asks how well the infinite-lattice value can be recovered by extrapolating those peaks from lattices small enough to solve exactly, and finds that a one-parameter law in N/(N + 1) does it robustly. fibub’s ising model playground playground enumerates small lattices exactly and runs Monte Carlo on larger ones, so the whole argument can be rebuilt in a browser tab. For the statistical mechanics behind it, see the partition function explorer explorer and the quantum statistics plotter plotter.

The paper in brief

The authors work with square N × N lattices and, for each, the exact density of states: how many spin configurations have each energy. From that they get the heat capacity C(T) exactly, with no simulation and no statistical error. They take the temperature of the heat-capacity maximum, Tmax(N), as the finite lattice’s stand-in for a critical temperature, locating it with Newton’s method on the derivative of C.

Their lattices go well beyond brute force: free boundaries to N = 12 by a transfer-matrix method (checked against brute-force enumeration to N = 5) and to N = 20 with a Pfaffian algorithm, plus periodic boundaries to N = 20 from Kaufman’s solution. They then compare several ways of pushing Tmax(N) to N → ∞: scaling models, an “envelope” construction across the C(T) curves, and the Binder cumulant method. The result they settle on is that a single-parameter model whose correction goes as N/(N + 1) converges reliably on Onsager’s exact value, and they offer a physical reading of why that proportionality appears.

Checked with the tools

What follows is a recomputation of the paper’s idea with fibub’s own code, not a reproduction of its numbers: the tool enumerates exactly only up to 4 × 4 and only with periodic boundaries, where the paper reaches 20 × 20 with both boundary types. Our question is a user’s question: how far can you get with the small lattices a phone can enumerate?

Step 1: exact heat capacities of tiny lattices. The tool sums over every configuration: 16 of them for 2 × 2, 512 for 3 × 3 and 65,536 for 4 × 4. The peaks sit at

Lattice Peak temperature Tmax Peak height C Above Tc by
2 × 2 2.51092 0.4148 0.2417
3 × 3 2.47648 0.6533 0.2073
4 × 4 2.43895 0.8165 0.1698
infinite (Onsager) 2.269185 diverges 0

Every peak is above Tc and every one is low and broad, exactly the behaviour the paper’s much larger lattices show. Nothing here is fitted: these are exact numbers for exact finite systems.

Heat capacity of exactly solved Ising latticesHeat capacity of exactly solved Ising lattices00.511.522345Temperature T (J/kB)Heat capacity per spin CTc = 2.26922 × 23 × 34 × 4infinite (Onsager)fibub.com
Figure 1. Heat capacity per spin from the Ising model playground's exact enumeration of 2 × 2, 3 × 3 and 4 × 4 periodic lattices, with Onsager's exact infinite-lattice curve dashed (cut either side of Tc, where it diverges). The smaller the lattice, the lower, broader and hotter the peak.

Step 2: the extrapolation, with two points. Plot those peak temperatures against 1/(N + 1) and draw a straight line through the two largest exactly enumerable lattices, 3 × 3 and 4 × 4. It crosses the axis at 2.2888, which is 0.87 % above the exact 2.269185. Two lattices small enough to enumerate on a phone give the critical temperature of an infinite system to better than one per cent.

Extrapolating the peak to an infinite latticeExtrapolating the peak to an infinite lattice2.32.42.500.10.20.31 / (N + 1)Peak temperature Tmaxexact Tc = 2.2692Line through N = 3 and 4Exact enumerationMonte CarloOnsager Tcfibub.com
Figure 2. The peak temperatures of Figure 1 plus two Monte Carlo lattices, against 1/(N + 1). The grey line uses only the 3 × 3 and 4 × 4 exact points and still lands within one per cent of the exact critical temperature.

Step 3: the choice of variable matters, which is the paper’s point. Fit the same two points against 1/N instead and the intercept is 2.3264, 2.52 % high: three times the error for the same data. Add the 2 × 2 lattice to the 1/(N + 1) fit and it gets worse, 2.3379 (3.03 % high), because a four-spin lattice is nowhere near the asymptotic regime and drags the line. So the (N + 1) form does converge faster, as the paper reports, and the smallest lattices should be left out rather than added for the sake of more points.

Step 4: extend with Monte Carlo. Above 4 × 4 the tool switches to Metropolis Monte Carlo. Scanning temperature and fitting a parabola to the three highest heat-capacity points gives a peak at 2.392 for 8 × 8 and 2.308 for 16 × 16, against 2.372 and 2.333 predicted by the line drawn from the exact 3 × 3 and 4 × 4 points: agreement to a few hundredths, which is about the accuracy a flat, broad peak allows with single-spin-flip updates near criticality. Fitting all four points (3, 4, 8, 16) in 1/(N + 1) gives 2.2774, now only 0.36 % above the exact value.

Extrapolation in 1/(N + 1) unless stated Estimate of Tc Error
exact 3 × 3 and 4 × 4 2.2888 +0.87 %
exact 2 × 2, 3 × 3, 4 × 4 2.3379 +3.03 %
exact 3 × 3 and 4 × 4, in 1/N 2.3264 +2.52 %
exact 3 × 3, 4 × 4 plus Monte Carlo 8 × 8, 16 × 16 2.2774 +0.36 %
Onsager, exact 2.269185 –

How we made the graphs

The charts and every number come from scripts/blog-figures/finite-lattice-ising-heat-capacity-peak-critical-temperature.mjs in fibub’s public code. It calls exactSmall (full enumeration of a periodic L × L lattice), Lattice and measure (Metropolis sweeps and block-error averages), onsager (the exact infinite-lattice energy and heat capacity, through a complete elliptic integral) and TC from src/lib/sci/phising.ts, the maths behind the ising model playground playground. Peak temperatures come from a golden-section search on the exact curves and a three-point parabola on the Monte Carlo scans; the extrapolations are plain least squares in 1/(N + 1) or 1/N.

From the paper: the method (heat-capacity maximum as the finite-lattice critical temperature, extrapolated with a correction in N/(N + 1)). Our own choices: periodic boundaries only, lattices 2 × 2 to 4 × 4 exactly and 8 × 8 and 16 × 16 by Monte Carlo, the scan windows, the sweep counts (10,000 to 20,000 settling and 120,000 to 200,000 measured sweeps per temperature) and the random seeds. Nothing is taken from the paper’s tables.

How we test the maths

On every change to fibub, tests/sci.mjs runs tests/sci-tools/ising-model.mjs, which pins this maths against an independent NumPy/SciPy script:

  • Exact enumeration of a 3 × 3 lattice at T = 2.5 must give energy per spin −1.462122418, magnetisation 0.816860819 and heat capacity 0.653032026, and a 4 × 4 lattice −1.379116482, 0.764712393 and 0.812515229.
  • Onsager’s exact energies must match a numerical integration of the free energy (−1.7455649 at T = 2, −1.1060799 at T = 2.5), and Tc must equal 2.269185314213022.
  • A Monte Carlo run on 4 × 4 at T = 2.5 must agree with the exact enumeration inside its own error bars, and a 32 × 32 lattice at T = 1.5 must sit within 0.005 of Onsager’s magnetisation.
  • New with this article: the exact heat-capacity peaks must be at T = 2.510920, 2.476479 and 2.438951 for 2 × 2, 3 × 3 and 4 × 4, with peak heights 0.414778, 0.653319 and 0.816461, and the 1/(N + 1) line through the 3 × 3 and 4 × 4 peaks must meet the axis at 2.28884.

Check it yourself

On the ising model playground page, in the Temperature scan card (the exact enumeration lives in the tool’s maths and its tests, so the page itself uses Monte Carlo):

  1. Lattice size 8 × 8, Lowest T 2.25, Highest T 2.55, Temperatures 13, Settling sweeps per T 2000, Measured sweeps per T 50000, Field h 0, Random seed 1. Press Run the scan.
  2. The headline reads Heat capacity peaks at T ≈ 2.35 (Onsager Tc = 2.269), with Heat capacity peak T = 2.35, C = 1.21 ± 0.012 per spin.
  3. Change Lattice size to 16 × 16 and run it again: the peak moves down to T = 2.3 and up to C = 1.55 ± 0.024. The bigger lattice has a taller, sharper peak closer to Tc, which is the finite-size effect the paper extrapolates away.
  4. Try 32 × 32 (slower): the peak stays at T = 2.3 on this grid but grows to C = 2.01 ± 0.085. Heat-capacity peaks grow only logarithmically in 2D, so this is the expected creep rather than a divergence.
  5. In the Live lattice card, set Temperature T to 2.269 and press Run: domains of every size appear and never settle. That is what the peak is made of.

What researchers can use it for

  • Teach finite-size scaling honestly: show that a finite lattice’s peak is above the critical temperature, then recover Tc by extrapolation, all with exact numbers for the small lattices.
  • Test an extrapolation scheme on a system whose answer is known exactly before trusting it on a model whose answer is not, as the paper does.
  • Check a simulation code against exact enumeration at 3 × 3 and 4 × 4, where every configuration is countable, before scaling up.
  • Plan a Monte Carlo campaign: the scan shows how many sweeps a peak needs at each size, and how quickly the error bars grow near Tc, where single-spin-flip updates slow down.
  • Compare observables: the heat-capacity peak, the susceptibility peak and the Binder cumulant crossing all converge on Tc at different rates, and the tool prints the first two in the same scan.

The fine print

  • fibub’s exact enumeration is limited to 4 × 4 and to periodic boundaries. The paper’s free-boundary lattices converge differently, and its transfer-matrix and Pfaffian methods reach 20 × 20; our numbers are not comparable with its tables, only with its method.
  • Our Monte Carlo peaks carry an uncertainty of a few hundredths from the flat, broad peak and from critical slowing down; the parabola fit through three points is a convenience, not a proper finite-size-scaling analysis.
  • The agreement within 1 % from two tiny lattices is partly luck: the correction terms happen to be small in this variable. The paper’s many lattices are what make the convergence demonstrable rather than anecdotal.
  • Units throughout are J = k_B = 1, no magnetic field, nearest-neighbour coupling only.

Sources

  • Markthaler, D. and Birke, K. P. (2025), Exploring Different Extrapolation Approaches for the Critical Temperature of the 2D-Ising Model Based on Exactly Solvable Finite-Sized Lattices, Entropy 27(11): 1139, doi:10.3390/e27111139. Licence CC BY 4.0, checked on the MDPI article page and in the Crossref record, 2026-11-24; no correction or retraction is recorded. Points used here: the finite-lattice critical temperature is taken as the heat-capacity maximum Tmax = 1/beta_max, found by Newton's method on the derivative of C(beta); free boundaries for N = 2 to 12 by transfer matrix (checked against brute force to N = 5) and N = 13 to 20 by a Pfaffian algorithm; periodic boundaries to N = 20 from Kaufman's solution; a one-parameter model for Tmax(N) following an N/(N+1) law converges robustly, and is compared with an envelope construction and with the Binder cumulant method.
  • Onsager, L. (1944), Crystal statistics I, Physical Review 65: 117-149 (the exact square-lattice solution, Tc = 2/ln(1+sqrt 2) = 2.269185 in units of J/kB). Kaufman, B. (1949), Physical Review 76: 1232.

If you are an author or publisher and want a credit or a passage changed or removed, tell us and we will act quickly.

Tools in this article

Read next