Particle in a Box - 1D Energy Levels Calculator

Find the quantized energy levels of a particle confined to a 1D box using E_n = n²h²/(8mL²).

📦 Particle in a Box - 1D Energy Levels Calculator
nm
kg
Energy (En)
Energy (joules)
Gap to next level
Step-by-step working

📦 What is the Particle in a Box Calculator?

The particle in a box calculator finds the quantized energy levels of a particle trapped between two rigid walls, one of the simplest and most important solvable systems in quantum mechanics. Enter the box length, a quantum number, and a particle mass, and it returns the energy of that level plus the gap to the next one.

Unlike a classical ball bouncing in a box, which can have any energy, a quantum particle confined to the same region can only take on a discrete set of energies, indexed by the quantum number n = 1, 2, 3, and so on. This quantization arises directly from requiring the particle's wavefunction to vanish at the rigid walls, which only permits standing-wave solutions with specific wavelengths.

The key relationship is E_n = n²h²/(8mL²): energy grows with the square of the quantum number and shrinks with the square of the box size. This means confining a particle to a smaller space always raises its energy, an effect called quantum confinement that explains why smaller quantum dots glow bluer and why lighter particles like electrons show quantum effects far more readily than heavier ones like protons.

This calculator is useful for physics and chemistry students studying quantum confinement, semiconductor quantum wells, and the general behaviour of bound quantum systems, since it handles the constants and unit conversions automatically and shows the working.

📐 Formula

En  =  n²h² ÷ (8mL²)
En = energy of quantum level n
n = quantum number (1, 2, 3, ...)
h = Planck constant ≈ 6.62607 × 10-34 J·s
m = particle mass
L = box length
Example: electron, L = 1 nm, n = 1: E1 ≈ 0.3760 eV.

📖 How to Use This Calculator

Steps

1
Enter the box length L in nanometres.
2
Enter the quantum number n, 1 for the ground state.
3
Choose the particle, electron, proton, or a custom mass.
4
Read the energy E_n and the gap to the next level.

💡 Example Calculations

Example 1 - Electron in a 1 nm box, ground state

1
L = 1 nm, n = 1, electron
2
E1 = 1² × h² ÷ (8 × 9.109×10-31 kg × (1×10-9 m)²)
3
E1 = 0.3760 eV
E1 = 0.3760 eV
Try this example →

Example 2 - Same box, first excited state (n = 2)

1
L = 1 nm, n = 2, electron
2
E2 = 2² × E1 = 4 × 0.3760 eV
3
E2 = 1.5041 eV, four times the ground-state energy
E2 = 1.5041 eV
Try this example →

Example 3 - Proton confined to a nucleus (10 femtometres)

1
L = 0.00001 nm (10 fm), n = 1, proton
2
E1 = h² ÷ (8 × 1.673×10-27 kg × (1×10-14 m)²)
3
E12,047,924 eV (2.05 MeV), the right order of magnitude for nuclear binding energies
E12.05 MeV
Try this example →

❓ Frequently Asked Questions

What is the particle in a box model?+
The particle in a box (or infinite square well) is a foundational quantum mechanics model where a particle is trapped between two impenetrable walls and can only take on discrete, quantized energy values, unlike a classical particle which could have any energy. It is one of the few quantum systems with an exact, simple solution, making it a standard teaching example.
What is the formula for particle-in-a-box energy levels?+
The energy of level n is E_n = n squared h squared divided by (8 m L squared), where n is the quantum number (1, 2, 3, ...), h is Planck's constant, m is the particle's mass, and L is the length of the box. Energy increases with the square of both n and 1/L.
Why can't a confined particle have zero energy?+
The ground state (n = 1) always has a positive energy, E_1 = h squared / (8mL squared), never zero. This is a direct consequence of the Heisenberg uncertainty principle: confining a particle to a finite region forces some minimum momentum uncertainty, which corresponds to a nonzero minimum kinetic energy called the zero-point energy.
How does energy level spacing change with n?+
Because E_n scales as n squared, the gap between consecutive levels grows as n increases: the E2−E1 gap is smaller than the E3−E2 gap, and so on. This unevenly-spaced ladder is a hallmark of the infinite square well, in contrast to the evenly-spaced levels of the quantum harmonic oscillator.
What happens to the energy levels as the box shrinks?+
Since E_n is inversely proportional to L squared, shrinking the box raises every energy level. This effect, called quantum confinement, is why quantum dots (nanocrystals) of different sizes emit different colors of light, smaller dots have higher-energy, bluer transitions.
Does the particle-in-a-box model apply to real systems?+
It is a simplification, but it captures the essential physics of many real systems: electrons in conjugated organic molecules, carriers confined in semiconductor quantum wells and quantum dots, and (roughly) nucleons confined within a nucleus. More realistic models use finite walls, but the infinite well gives the right qualitative n-squared scaling.
How is this different from the hydrogen atom energy levels?+
The hydrogen atom's energy levels come from an attractive Coulomb potential and scale as −13.6/n² eV, converging to zero at high n (ionisation). The particle-in-a-box has a flat potential inside rigid walls, and its levels scale as +n², growing without bound as n increases. Both are quantized, but the physical origin and scaling are different.
What mass should I use for a proton or nucleon confined in a nucleus?+
For a rough estimate of nuclear energy scales, model a nucleon as a particle in a box with L equal to the nuclear diameter (a few femtometres) and m equal to the proton or neutron mass. This gives energies in the megaelectronvolt range, which matches the real order of magnitude of nuclear binding energies, even though the true nuclear potential is not a simple square well.
What does the wavefunction look like inside the box?+
Each energy level n corresponds to a standing wave with n half-wavelengths fitting exactly inside the box, similar to the standing waves on a guitar string fixed at both ends. The ground state (n = 1) is a single smooth hump, n = 2 has one node in the middle, and higher states have n − 1 internal nodes where the particle is never found.
How accurate is the infinite-wall assumption?+
Real confining potentials, such as a semiconductor quantum well or a nucleus, have finite walls, so the wavefunction can leak slightly outside the classical boundary and the true energy levels sit a little lower than the infinite-well formula predicts. Even so, the infinite well captures the correct n-squared scaling and order of magnitude, making it a valuable first approximation.

What is the particle in a box model?

The particle in a box (or infinite square well) is a foundational quantum mechanics model where a particle is trapped between two impenetrable walls and can only take on discrete, quantized energy values, unlike a classical particle which could have any energy. It is one of the few quantum systems with an exact, simple solution, making it a standard teaching example.

What is the formula for particle-in-a-box energy levels?

The energy of level n is E_n = n squared h squared divided by (8 m L squared), where n is the quantum number (1, 2, 3, ...), h is Planck's constant, m is the particle's mass, and L is the length of the box. Energy increases with the square of both n and 1/L.

Why can't a confined particle have zero energy?

The ground state (n = 1) always has a positive energy, E_1 = h squared / (8mL squared), never zero. This is a direct consequence of the Heisenberg uncertainty principle: confining a particle to a finite region forces some minimum momentum uncertainty, which corresponds to a nonzero minimum kinetic energy called the zero-point energy.

How does energy level spacing change with n?

Because E_n scales as n squared, the gap between consecutive levels grows as n increases: the E2−E1 gap is smaller than the E3−E2 gap, and so on. This unevenly-spaced ladder is a hallmark of the infinite square well, in contrast to the evenly-spaced levels of the quantum harmonic oscillator.

What happens to the energy levels as the box shrinks?

Since E_n is inversely proportional to L squared, shrinking the box raises every energy level. This effect, called quantum confinement, is why quantum dots (nanocrystals) of different sizes emit different colors of light, smaller dots have higher-energy, bluer transitions.

Does the particle-in-a-box model apply to real systems?

It is a simplification, but it captures the essential physics of many real systems: electrons in conjugated organic molecules, carriers confined in semiconductor quantum wells and quantum dots, and (roughly) nucleons confined within a nucleus. More realistic models use finite walls, but the infinite well gives the right qualitative n-squared scaling.

How is this different from the hydrogen atom energy levels?

The hydrogen atom's energy levels come from an attractive Coulomb potential and scale as −13.6/n² eV, converging to zero at high n (ionisation). The particle-in-a-box has a flat potential inside rigid walls, and its levels scale as +n², growing without bound as n increases. Both are quantized, but the physical origin and scaling are different.

What mass should I use for a proton or nucleon confined in a nucleus?

For a rough estimate of nuclear energy scales, model a nucleon as a particle in a box with L equal to the nuclear diameter (a few femtometres) and m equal to the proton or neutron mass. This gives energies in the megaelectronvolt range, which matches the real order of magnitude of nuclear binding energies, even though the true nuclear potential is not a simple square well.

What does the wavefunction look like inside the box?

Each energy level n corresponds to a standing wave with n half-wavelengths fitting exactly inside the box, similar to the standing waves on a guitar string fixed at both ends. The ground state (n = 1) is a single smooth hump, n = 2 has one node in the middle, and higher states have n − 1 internal nodes where the particle is never found.

How accurate is the infinite-wall assumption?

Real confining potentials, such as a semiconductor quantum well or a nucleus, have finite walls, so the wavefunction can leak slightly outside the classical boundary and the true energy levels sit a little lower than the infinite-well formula predicts. Even so, the infinite well captures the correct n-squared scaling and order of magnitude, making it a valuable first approximation.