Compton Scattering Calculator

Shift, scattered energy and recoil, conservation checked.

  • Compton edge
  • Recoil angle
  • Energy or wavelength
A small rounded clay table with a soft clay ribbon arriving from the left, a rounded bead pushed to one side and the ribbon leaving at an angle.

The guide

A photon that knocks an electron aside must come away poorer, and only the angle decides how much

Compton scattering showed that light carries momentum. Conservation of energy and momentum fixes the wavelength shift, the electron's recoil and the largest energy it can take.

  • 2.42631 pm the Compton wavelength of the electron, h / (m_e c)
  • 4.85262 pm the largest possible shift, for a photon turned straight back
  • 288.390 keV what a 662 keV photon keeps after a 90 degree scatter
  • 477.650 keV the Compton edge for a 662 keV photon
  • 9.6234 keV what a 10 keV photon keeps after turning straight back
Read the full guide Fold the guide 7 min · 16 sources

Aim a beam of X-rays at a piece of matter and some of it comes out sideways with a longer wavelength than it went in. Nothing in the wave picture of light predicts that. The stretch depends on the angle the light is turned through, and on nothing else about the light.

Arthur Compton reported the effect in 1923, and the Wikipedia page on Compton scattering notes that he received the 1927 Nobel Prize in Physics for it. His result persuaded physicists that light can be treated as a stream of particle-like quanta, photons, that carry momentum as well as energy. A calculator can then do the rest, because two conservation laws leave almost no freedom.

Why the photon has to lose energy

Picture a photon of energy E meeting an electron that is free and at rest. Before the meeting the electron has only its rest energy, 0.51099895069 MeV in the NIST table, which is 510.999 keV. Energies on this page are in keV; the Electronvolt page puts one electronvolt at 1.602176634 times 10 to the power of minus 19 joules. After it, the photon has gone off at some angle theta and the electron is moving. Energy is conserved, so the photon’s energy before equals its energy after plus the electron’s kinetic energy.

An electron that moves has positive kinetic energy. So the photon must come away with less than it brought. A photon’s energy is Planck’s constant times its frequency, and NIST lists that constant as exactly 6.62607015 times 10 to the power of minus 34 joule seconds. Less energy therefore means a longer wavelength. That is the whole reason for the shift. No tuning, no detail of the target: only the fact that something was set moving.

How much it moves depends on the angle. Momentum is conserved too, and it is a vector. If the photon barely changes direction, it hands over a little momentum and the electron barely stirs. If it bounces straight back, the electron has to absorb the most momentum it ever can. Energy and momentum together fix the electron’s speed, its direction and the photon’s new energy, all from the single choice of theta.

Why the angle sets the shift and the wavelength does not

The Wikipedia page gives the result in wavelengths. The new wavelength minus the old one equals h divided by the product of the electron mass and the speed of light, multiplied by one minus the cosine of the angle. The quantity h / (m_e c) is the Compton wavelength of the electron. It is built from three constants: the exact Planck constant, the exact speed of light (299,792,458 metres per second, from the NIST page) and the electron mass, 9.1093837139 times 10 to the power of minus 31 kilograms. The result is 2.42631 pm to six figures, which the NIST and Compton wavelength pages both list, and the Wikipedia page on Compton scattering rounds it to 2.43 pm.

Read the formula carefully. The incoming wavelength does not appear in it. A photon of 100 pm scattered through 90 degrees leaves at 102.42631 pm, and a photon of 1 pm scattered through the same angle leaves at 3.42631 pm. Both are stretched by exactly 2.42631 pm. The first changes by about 2.4 percent. The second more than triples.

The factor is one minus cos theta, not cos theta. At 0 degrees it is zero, so nothing changes, which is right: a photon that is not deflected has given nothing away. At 90 degrees it is exactly 1, so the shift equals one Compton wavelength. At 180 degrees it reaches 2, which gives the largest shift, 4.85262 pm. At 30 degrees it is 0.32506 pm.

Energy tells the same story from the other side. The page writes the scattered energy as E divided by one plus the product of E over the electron’s rest energy and one minus cos theta. A fixed stretch is a large fraction of a short wavelength and a tiny fraction of a long one. Because energy is inversely proportional to wavelength, a short, energetic photon loses a large share, and a long one loses almost none. A 10 keV photon turned straight back keeps 9.6234 keV, about 96 percent. A 662 keV photon turned straight back keeps only 184.350 keV.

Why only X-rays and gamma rays show it

The Wikipedia table of the electromagnetic spectrum puts visible light at 400 to 700 nm. Take 500 nm, which is 500,000 pm. The biggest possible shift, 4.85262 pm, is then about one part in 100,000. That is far below what a spectrometer separates in an everyday experiment, so the effect hides in plain sight.

The ratio improves as the wavelength falls toward the Compton wavelength. Compton’s own X-rays carried about 17 keV, and a photon of that energy turned straight back loses roughly 1 keV, about six percent. Raise the energy to the hundreds of keV and the loss becomes dramatic. The effect is visible only when the photon’s energy is a noticeable fraction of the electron’s 511 keV.

At the other extreme, the Thomson scattering page describes the low-energy limit of Compton scattering. When the photon energy is far below the electron’s rest energy, or equivalently the wavelength is far longer than the Compton wavelength, the photon’s frequency does not change. Compton scattering is the full story and Thomson scattering is its quiet end.

One caution about the target. Compton found that some X-rays showed no shift at all, even after large deflections. In those cases the photon had not ejected an electron, so the scatterer was effectively the whole atom, whose Compton wavelength the Wikipedia page says can be upwards of 10000 times smaller. The shift depends on the mass of whatever does the scattering, and this tool uses the electron.

The Compton edge

Now turn a detector on. A gamma ray crossing a crystal can scatter off an electron and leave. The electron’s energy is deposited, and it can be anything from nearly nothing to a maximum. The Wikipedia page on the Compton edge says the highest energy that can be deposited corresponds to full backscatter, and calls that limit the Compton edge.

Set theta to 180 degrees in the energy formula and the electron’s share becomes T_max = E (2E / m_e c^2) divided by (1 + 2E / m_e c^2). It depends only on the photon’s energy. It is not a function of the angle you happen to pick, which is why this tool shows it in its own box.

Take the 662 keV line. The Caesium-137 page lists its gamma ray at 0.6617 MeV, and the tool rounds that to 662 keV. The ratio E / m_e c^2 is 1.29550, so the factor 2E / m_e c^2 is 2.59100. The photon keeps 184.350 keV and the electron takes the Compton edge, 477.650 keV. Nothing a single scatter can do gives the electron more.

Above 1.022 MeV, which is twice the electron’s rest energy, a photon near a nucleus can also turn into an electron and positron pair, as the Pair production page explains. That is a different process with its own rules, and it is not modelled here.

One worked example, and how the answer is checked

Start with 662 keV at 90 degrees. The wavelength is hc / E = 1239.84 keV pm / 662 keV = 1.87287 pm. The shift at 90 degrees is one Compton wavelength, 2.42631 pm, so the photon leaves at 4.29918 pm. The scattered energy is 662 / (1 + 1.29550) = 288.390 keV.

The electron takes the rest, 373.610 keV. Its direction follows from the momentum balance. Measured from the incoming direction, tan phi equals 1 / ((1 + 1.29550) tan 45 degrees), which gives 23.5396 degrees on the side opposite the scattered photon. At 60 degrees the scattered photon has 401.760 keV, and at 180 degrees it has 184.350 keV.

Those figures come from a formula, so the tool checks them without it. It writes energy conservation with the electron’s relativistic kinetic energy, writes momentum conservation for its size, and finds the electron energy that satisfies both by halving an interval until the root is pinned. It then compares the answer with the formula, along with the momentum components and the recoil angle.

In our run, 8,664 such solves, across 24 energies from 0.001 keV to a million keV and every half degree, agreed with the formula to better than 5 parts in 10^14 of the incoming energy. The independent Python reference gave the same figures. The check is only as good as its inputs: both use the same CODATA constants, so it tests the algebra, not the constants.

What the method cannot do

The calculator treats the electron as free and at rest. Real atoms bind their electrons, and when the photon energy is small beside the binding energy the free picture fails. In Compton’s own experiment the 17 keV photons were far above the binding energy, so it held.

It also says where a photon can go, not how often. The Klein-Nishina formula, first derived in 1928 by Oskar Klein and Yoshio Nishina, gives the likelihood of each angle, and nothing here computes it. It does not run the process backward either, where an energetic electron hands energy to a photon, as when photons from the cosmic microwave background pass through hot gas.

The heavy parts run in a background worker, as the Web Workers API documentation describes, and numbers are formatted with the browser’s number formatter. Every constant comes from the NIST pages listed below. Typed numbers are limited to 20 characters, and nothing you enter leaves the page.

Sources

Every source consulted for this guide. Links checked November 11, 2026.

  1. Compton scattering Wikipedia
  2. Compton edge Wikipedia
  3. Thomson scattering Wikipedia
  4. Klein-Nishina formula Wikipedia
  5. Compton wavelength Wikipedia
  6. Pair production Wikipedia
  7. Electromagnetic spectrum Wikipedia
  8. Caesium-137 Wikipedia
  9. Electronvolt Wikipedia
  10. CODATA Value: electron mass National Institute of Standards and Technology
  11. CODATA Value: speed of light in vacuum National Institute of Standards and Technology
  12. CODATA Value: Planck constant National Institute of Standards and Technology
  13. CODATA Value: electron mass energy equivalent in MeV National Institute of Standards and Technology
  14. CODATA Value: Compton wavelength National Institute of Standards and Technology
  15. Web Workers API MDN Web Docs (Mozilla)
  16. Intl.NumberFormat MDN Web Docs (Mozilla)