Neutrino MSW Resonance Density Calculator
Introduction
This calculator estimates the matter density at which a neutrino undergoes Mikheyev–Smirnov–Wolfenstein resonance, usually shortened to MSW resonance. In plain language, it tells you the density of ordinary matter needed for the medium itself to strongly enhance flavor conversion. That enhancement happens because electron neutrinos interact with electrons in matter through coherent forward scattering, which changes the effective oscillation parameters compared with vacuum. When the matter contribution lines up with the vacuum mass splitting in the right way, the effective mixing becomes maximal and flavor conversion can become especially efficient.
The result is useful in several settings. In solar neutrino physics, it helps explain why the neutrino flavor composition measured on Earth differs from the flavor composition produced in the Sun. In supernova studies, it gives a first estimate of where in the stellar profile matter effects become important. In long-baseline experiments, it helps build intuition for how Earth matter changes oscillation probabilities. This page focuses on the standard two-flavor resonance condition and turns it into practical numbers: electron number density and mass density.
Although the underlying physics is quantum mechanical, the calculator itself is straightforward to use. You provide the mass-squared difference, the vacuum mixing angle, the neutrino energy, and the electron fraction of the medium. The script then evaluates the resonance condition, converts the result into familiar density units, and labels the environment in broad terms so the number is easier to interpret.
Just as importantly, the page is meant to help you read the answer rather than merely generate it. A resonance density is not a probability by itself. It is a condition on the medium. If the actual matter profile along the neutrino path passes through that density, then matter-enhanced conversion can become significant. If the medium never reaches that density, or if the density changes too abruptly for adiabatic evolution, the physical impact may be smaller than the resonance number alone suggests. Keeping that distinction in mind makes the output much more useful.
How to Use
Start by entering the neutrino oscillation parameters in the form below. The field labeled Δm² is the mass-squared difference in eV². The mixing angle θ should be entered in degrees, not radians. The energy E is entered in MeV. Finally, Ye is the electron fraction, meaning the number of electrons per nucleon in the medium. A value near 0.5 is common for many astrophysical examples and is provided as the default.
After you click Compute Resonance, the calculator returns two related quantities. The first is the resonance electron number density ne in cm−3. The second is the corresponding mass density ρ in g/cm3, obtained by using the electron fraction to convert number density into bulk matter density. The result area also gives a simple environment label. That label is not a rigorous classification of astrophysical objects; it is only a quick descriptive guide to help you judge whether the density is closer to atmospheric, planetary, envelope-like, or deep stellar conditions.
There are a few input checks built into the script. The mass-squared difference, energy, and electron fraction must all be positive. The mixing angle must lie strictly between 0° and 90°. In addition, the code requires cos(2θ) to be positive, because the resonance expression used here assumes that sign. If your chosen angle makes cos(2θ) zero or negative, the page will explain that no physical resonance is produced within this simplified setup.
A practical way to use the tool is to hold three inputs fixed and vary the fourth. That lets you see the scaling directly. If you increase the energy while keeping the oscillation parameters the same, the resonance density falls. If you lower the electron fraction, the same electron density corresponds to a larger mass density. This kind of one-parameter exploration is often more educational than entering a single benchmark point and stopping there.
Formula
The resonance condition in the two-flavor approximation is written in terms of the electron number density. At resonance, the matter potential balances the vacuum term, giving the electron density
Here, is the mass-squared difference, is the vacuum mixing angle, is the Fermi constant, and is the neutrino energy. This relation shows the main scaling immediately: larger mass splittings increase the resonance density, while larger neutrino energies decrease it. The factor tells you that the resonance becomes less pronounced as the vacuum mixing approaches maximal mixing.
To convert electron number density into mass density, the calculator uses the electron fraction . The relation between number density and mass density is
where is the proton mass. Combining the two expressions gives the practical resonance mass density formula
For quick estimates in cgs units, the page also preserves the common approximation
This approximation is useful for intuition, but the script performs the calculation internally using constants and unit conversions before presenting the final values in cm−3 and g/cm3. In other words, the displayed formula tells you the physics, while the JavaScript handles the bookkeeping needed to turn that physics into a numerical answer in familiar units.
The same resonance condition can also be written in terms of the matter potential itself. In two-flavor language, the effective potential for electron neutrinos in ordinary matter is proportional to the electron density:
Resonance occurs when that matter term matches the vacuum splitting projected onto flavor space:
Those two equations are mathematically equivalent to the density formulas above, but some readers find them more intuitive because they show the balancing of a matter term against a vacuum term directly.
Interpreting the Inputs and Outputs
Each input has a clear physical role. Increasing Δm² raises the resonance density because the vacuum splitting becomes harder for matter to match. Increasing the neutrino energy lowers the resonance density because the matter term scales with energy in the denominator of the resonance condition. Lowering Ye increases the mass density needed for the same electron density, since fewer electrons are available per unit mass. The mixing angle matters through cos(2θ): small angles keep this factor near one, while angles closer to 45° reduce it and therefore reduce the resonance density.
The output ne is the direct resonance condition in terms of electrons per cubic centimeter. The output ρ is often easier to compare with real environments because stellar models, planetary interiors, and laboratory matter profiles are usually quoted as mass density. If the value is around a few g/cm3, you are in the rough range of terrestrial rock or parts of Earth’s mantle. If it is tens to hundreds of g/cm3, the result is more suggestive of dense stellar regions. If it is much larger, the resonance would occur only in very dense astrophysical matter.
The environment label shown by the calculator is intentionally broad. It is there to provide intuition, not to replace a detailed density profile. Real stars, planets, and supernovae have density gradients, composition changes, and sometimes additional neutrino self-interaction effects. The label should therefore be read as a quick educational cue rather than a precise astrophysical diagnosis.
It is also worth separating resonance from strong overall oscillation probability. A medium can satisfy the resonance condition at one location, but the final flavor outcome still depends on path length, density variation, and whether the neutrino state follows the changing matter eigenstates adiabatically. So the calculator answers the question “At what density does resonance occur?” rather than “What flavor probability will be measured after propagation?” That distinction keeps expectations realistic and helps place the result in the correct theoretical context.
Example
A standard worked example uses solar-scale oscillation parameters. Suppose you enter Δm² = 7.5×10−5 eV², θ = 33°, E = 10 MeV, and Ye = 0.5. The factor cos(2θ) is positive, so the resonance condition is physically allowed in this simplified treatment. The calculator then returns an electron number density on the order of 1024–1025 cm−3 and a mass density on the order of 102 g/cm3. That is in the same broad range as the solar core, which is exactly why the MSW effect is central to the solar neutrino story.
You can also see how the scaling works by changing only one variable at a time. If you keep the same Δm² and angle but double the neutrino energy, the resonance density drops by about a factor of two. If instead you keep the energy fixed and increase Δm², the resonance density rises proportionally. This makes the calculator useful not only for obtaining a number, but also for building intuition about how matter effects shift across different neutrino sources and experiments.
Another helpful comparison is to keep Δm² and E fixed while changing Ye. The electron number density at resonance does not depend on Ye, but the mass density does. If Ye falls from 0.5 to 0.25, the same required electron density corresponds to twice as much mass per unit volume. That is why composition matters when translating a resonance condition into an astrophysical location. Two regions with the same mass density can have different electron densities if their compositions differ, and only the electron density enters the weak potential directly.
For reference, the table below lists representative values for several parameter choices. These are illustrative rather than exhaustive, but they show how widely the resonance density can vary across solar, atmospheric, reactor, and accelerator contexts.
| Δm² (eV²) | E (MeV) | ne (cm−3) | ρ (g/cm3) |
|---|---|---|---|
| 7.5×10−5 | 10 | 6.9×1024 | 150 |
| 2.5×10−3 | 3 | 7.7×1026 | 1700 |
| 2.5×10−3 | 10 | 2.3×1026 | 500 |
These examples span solar and atmospheric mass splittings and energies relevant to reactor and accelerator neutrino studies. The spread in densities explains why matter effects can be important in very different environments. In some cases the resonance lies in a stellar interior; in others it may be closer to densities encountered in planetary material or in the Earth along a long-baseline path.
If you want a quick mental check on the result, remember the proportionality
That compact scaling relation is often enough to tell whether a new answer should be larger or smaller than a previous one before you even press the button.
Physical Context
The MSW effect is one of the clearest demonstrations that neutrino oscillations depend not only on intrinsic particle properties but also on the medium through which the particles travel. In the Sun, electron neutrinos are produced in nuclear reactions and then move outward through a changing density profile. If the density changes slowly enough, the evolution can be adiabatic, meaning the neutrino remains on an instantaneous matter eigenstate as conditions change. In that regime, resonance can lead to very efficient flavor conversion. This mechanism helped resolve the historical solar neutrino problem by showing that the missing electron neutrinos had not disappeared; they had changed flavor.
In supernovae, the same basic resonance idea appears in a much richer environment. Densities are far higher, gradients can be steep, and neutrino-neutrino interactions may also matter. Even so, the simple resonance density remains a useful first checkpoint. It tells you where standard matter effects would be expected before more complicated collective behavior is added. In Earth-based accelerator experiments, matter effects are smaller than in stars but still important. They can enhance or suppress oscillation channels differently for neutrinos and antineutrinos, which is why they matter for mass-ordering studies.
Because of that broad relevance, a resonance-density calculator is valuable as both a teaching tool and a quick estimation tool. It does not replace a full oscillation code with realistic density profiles, but it gives a compact bridge between the abstract formula and the physical environments where neutrinos are observed.
There is also a conceptual lesson hidden in the calculation. Vacuum oscillations are often introduced as if they depend only on baseline and energy, but matter reminds us that propagation is environmental. The Hamiltonian felt by the neutrino changes when the background changes. In that sense, the MSW effect is not a small correction to oscillation physics; it is a vivid example of how a medium can reshape the effective parameters of a quantum system. The resonance density is the simplest numerical doorway into that idea.
Assumptions, Sign Conventions, and Limits
This calculator uses the standard two-flavor MSW resonance condition. That means it is best understood as an educational or first-pass estimate rather than a complete three-flavor oscillation solver. Real neutrino propagation can involve multiple mixing angles, CP-violating phases, normal or inverted ordering effects, and density profiles that vary continuously rather than staying fixed at one value. In many practical problems, especially precision experimental work, those details matter.
The calculation also assumes the standard matter potential from ordinary electrons and uses a single electron fraction Ye to convert electron density into mass density. If the composition changes strongly with position, or if non-standard neutrino interactions are present, the true resonance condition can shift. Likewise, in supernova environments, neutrino self-interactions can alter flavor evolution in ways not captured here. The environment labels are intentionally simple and should not be treated as formal astrophysical classifications.
Finally, the script checks for the condition cos(2θ) > 0. That is appropriate for the resonance expression implemented on this page, but it also means some parameter choices that are meaningful in broader oscillation discussions will be rejected here because they do not fit this simplified resonance criterion. If you need precision modeling, sign conventions for different channels, or full three-flavor matter evolution, use this calculator as a starting point and then move to a dedicated neutrino oscillation framework.
One more subtle point concerns neutrinos versus antineutrinos. In ordinary matter, the sign of the effective potential reverses for antineutrinos. Whether a resonance exists therefore depends on both the sign convention for and the channel being considered. This page does not attempt to sort through every hierarchy and channel combination. Instead, it implements a single, transparent criterion and reports when the chosen inputs do not satisfy it. That keeps the calculator simple and predictable while still matching the educational purpose of the page.
As a final rule of thumb, treat the output as a resonance marker, not a full propagation solution. If a realistic density profile crosses the computed value slowly, matter enhancement can be strong. If the crossing is absent, abrupt, or masked by additional physics, the actual flavor evolution may differ. The calculator is therefore most powerful when used alongside physical judgment about the source, the medium, and the neutrino channel of interest.
Summary
In short, this calculator turns a compact piece of neutrino oscillation theory into a practical estimate. Enter the mass-squared difference, mixing angle, neutrino energy, and electron fraction, and the page returns the electron density and mass density associated with MSW resonance. The formulas preserved above show why the answer scales the way it does, and the surrounding discussion explains how to interpret the number in solar, terrestrial, and stellar settings. For students, it is a quick way to connect equations to physical environments. For researchers and educators, it is a convenient back-of-the-envelope tool for checking whether matter enhancement should be expected in a given regime.
