CMB Power Spectrum
Move the six parameters of a flat ΛCDM universe and watch the temperature (TT), polarisation (EE) and cross (TE) spectra of the CMB respond.

The power spectrum says how strong the fluctuations of the CMB are at each angular scale: against the multipole , where larger means smaller angles on the sky. The dashed curve is the Planck 2018 best-fit model and the solid one is yours. TT is the temperature, EE the E-mode polarisation and TE their correlation. The horizontal axis is logarithmic up to and linear after it.
01 What each slider does
The model is flat ΛCDM with primary anisotropies and CMB lensing (CAMB); there is no SZ, no foregrounds, no tensor modes. The sliders for the matter densities are and , as fractions of the critical density. The CMB responds to the physical densities , and they are kept independent of : moving leaves and alone and the two sliders move instead, as . Below, for each parameter: what it is, the physics it enters through, and its contribution to the spectrum.
Baryon density ()
How much ordinary matter there is: the protons and electrons that make up stars, gas and us, about 5% of the universe's energy.
Before recombination the photons and baryons are one fluid, a plasma that falls into the dark-matter potential wells and is pushed back out by photon pressure, ringing like a sound wave. Baryons add weight to that fluid: it sags deeper into the wells than it springs back out, so the compressions are favoured over the rarefactions. Heavier fluid also carries sound more slowly, so the wave travels a shorter distance before recombination. And more baryons mean more free electrons, which keep photons more tightly coupled and let less of the small-scale structure leak out by photon diffusion (Silk damping).
Compression (odd) peaks are enhanced over rarefaction (even) peaks by an amount that grows with , so the 2nd peak drops relative to the 1st and 3rd. A smaller moves the peaks to higher , , as a small shift. The damping wavenumber grows with , so the envelope moves out and the damping tail rises slightly. The same odd/even modulation is in EE, in the opposite phase to TT. Try: raise and watch the 2nd peak fall.
Cold dark matter density ()
How much non-baryonic matter there is, which feels gravity but never interacts with light, about a quarter of the universe.
Dark matter is the scaffolding the plasma moves on. Its main role in the CMB is the timing of matter-radiation equality: the more dark matter, the earlier gravity takes over from radiation. While radiation still matters, the potential wells that the fluid is falling into are decaying, and this decay pumps the oscillation like pushing a swing at the right moment, boosting the peaks. The sooner equality happens, the less pumping the modes get; the same residual radiation also gives a leftover early ISW signal near the first peak.
A larger moves earlier: less driving, less early ISW, so the peaks come down, the 1st most. The low- Sachs-Wolfe plateau, with in matter domination, does not depend on at fixed , so the peaks sink against it. A faster early expansion also shrinks and a larger changes , so the peaks shift in a little. At fixed a larger lowers . Try: raise and compare the 1st peak with the plateau.
Hubble constant
The expansion rate today, in km/s/Mpc. It sets the size of the universe and the scale for distances.
The CMB does not know about directly: it knows the physical densities, and the angle on the sky at which we see the fixed physical ruler of the sound horizon. Here is varied with the physical densities and held fixed (the sliders move to compensate), so the early-universe physics, and the ruler, do not change at all. What changes is the dark energy: in a flat universe a larger means a smaller matter fraction and so a larger , which shortens the distance to the last-scattering surface. The same ruler at a shorter distance looks larger, so the acoustic pattern is redrawn on the sky with each feature spanning a larger angle, and the peaks sit at higher .
The acoustic angle is (shown under the sliders), and every peak is at with a phase shift (about for the Planck model, the 1st peak near 220). With fixed by and , a larger only shortens (through ), and the whole pattern shifts to higher with its shape and heights intact; the larger adds a little late ISW power at the lowest . On the plot this is the cleanest change of position of any slider. Try: move and compare with the peak positions.
Optical depth
How opaque the universe was to CMB photons after the first stars ionized the gas again: the chance that a photon scattered on its way to us.
The first stars and galaxies reionized the gas. Free electrons appeared again and scattered a fraction of the CMB photons on their way to us. Those photons are knocked out of the direction they came from, and their small-scale anisotropy is smeared out, so everything inside the horizon scale at that time is dimmed, and all peaks are lower by the same factor. But the same scattering of the large-scale temperature quadrupole polarises the light, so a new polarisation signal appears at the largest angles, where recombination produces essentially none.
For the amplitude is scaled by in TT and EE, and TE by too, with no change of shape. At low the E-mode amplitude is linear in , so the reionization bump of EE grows as , and the low- TE grows as . Only the combination is fixed by the high- spectra; the low- EE bump breaks the degeneracy. Try: raise in EE and watch the bump rise while the peaks fall.
Spectral index
How the strength of the primordial fluctuations changes with scale: would be the same on all scales.
Inflation stretched quantum fluctuations to cosmic size, and because the expansion rate slowly changed during it, the fluctuations that left the horizon earlier (large scales) are not quite the same strength as those that left later (small scales). is the measure of this slow tilt: Planck sees slightly more power on large scales (). In the CMB, scale is angle: the large scales are the low multipoles, the small ones the high multipoles.
A tilt about that does not move any peak: to first order , for instance on the Sachs-Wolfe plateau. A larger lowers the plateau and raises the peaks beyond the pivot and the damping tail, equally in TT, EE and TE. Try: raise and compare the plateau with the 3rd peak.
Primordial amplitude
The overall strength of the initial fluctuations laid down by inflation, at one reference scale.
It is the starting amplitude from which all the physics above grows. It does not change the dynamics, only the scale of the result: a louder start gives a louder sky at every angle. The photons then carry that amplitude through the plasma, so the shape of the spectrum is set by the other parameters and the height by . Gravitational lensing, which redistributes power between scales, also depends on it, because the lensing deflections are themselves made by the same fluctuations.
The primary at every , an offset of with no change of shape or position. The lensed spectra scale a little faster than linearly, mostly in the peak smoothing and in the damping tail, which is why the emulator treats as a fitted variable rather than a factor. At it is degenerate with through . Try: raise and together and see TT hold at high while EE moves at low .
Flatness fixes the dark-energy density, , with the neutrinos and the radiation taken out as CAMB does. It is shown under the sliders (0.685 for the Planck model). It has no slider, but it enters twice: through , hence the peak positions, and through the late ISW effect, as the potentials decay at , which adds power to TT at .
02 How it works without a solver
A Boltzmann code takes seconds per model, too slow for a slider. So the spectra are calculated ahead of time on a grid of models and the page interpolates between them.
A grid of real calculations
CAMB, a Boltzmann code, was run offline for 5,625 models: 5 values each of , , and , and 3 each of and . Only the fitted result is shipped (270 KB), not the code or the runs.
The peaks are lined up first
Changing , or moves the acoustic peaks to other , because it changes the angular size of the sound horizon. Fitting curves whose peaks sit in different places would smear them, so every curve is stored against (for ) and is fitted as well.
The right quantity is fitted
TT and EE are fitted as , and TE as the correlation , which stays between and and does not cross zero as sharply as TE itself. is divided out exactly and put back, since the unlensed spectra scale with it; the fit only has to carry what lensing adds. and enter through their logarithms, because the low- EE bump goes as .
A polynomial replaces the solver
The curves are reduced to 24 principal components per spectrum. The coefficient of each component, and , is a degree-4 polynomial in the six parameters (196 Chebyshev terms), fitted by least squares to the 5,625 models. The browser evaluates the polynomials and rebuilds the curve: a few milliseconds, so the sliders move the plot continuously.
03 How accurate it is
I compared the emulator with 200 new CAMB runs at random parameters inside the box, over to . The table gives the 95th-percentile error, as a fraction of the value (for TE, of ). Interpolating between the grid nodes, which I tried first, was about four times less accurate than the polynomial (0.16% against 0.02–0.07% at ) and its data four times larger.
| Spectrum | ℓ 2–30 | ℓ 30–200 | ℓ 2000–2500 |
|---|---|---|---|
| TT | 0.04% | 0.02% | 0.04% |
| EE | 10%* | 0.25% | 0.07% |
| TE | 1.8% | 0.13% | 0.04% |
Between and the 95th-percentile error is under 0.1% for all three. *The weak spot is EE at , around –10, where EE falls to about , against about in its reionization bump, so the error cannot be seen on the plot (the 10% is a relative error of that tiny value). At every , cosmic variance, the limit of what the sky can tell us, is far larger than these errors. Beyond the fitted box the sliders stop. The box is –, –, –, –, – and –; at that is – and –. The model is flat, with a neutrino mass sum of 0.06 eV and no tensor modes.
04 Credits
The spectra were computed with CAMB (Lewis, Challinor & Lasenby 2000, ApJ 538, 473). The reference model uses the Planck 2018 best-fit values (Planck Collaboration 2020, A&A 641, A6, TT,TE,EE+lowE+lensing).