
At a Glance
A particle in a box is a particle confined to a region of width L by walls it cannot pass. Its allowed energies are E_n = n^2 h^2 / (8 m L^2) with n = 1, 2, 3 and so on, so energy rises with n squared and grows when the box gets narrower or the particle lighter.
- Also called
- Infinite square well
- Energy formula
- En = n²h²/(8mL²)
- Quantum number
- n = 1, 2, 3, … (n = 0 is not allowed)
- SI unit of energy
- joule (J), often quoted in electronvolts (eV)
- Depends on
- Particle mass m, box width L, level n
- Key idea
- Confinement forces energy into discrete steps
On this page
- What Is a Particle in a Box?
- Particle in a Box Explained Simply
- Why Is the Energy of a Particle in a Box Quantized?
- What Is the Formula for the Energy Levels?
- What Do the Wave Functions Look Like?
- Why Can't the Particle Have Zero Energy?
- How Do Box Size and Mass Change the Energy?
- How Does a Particle in a Box Absorb or Emit Light?
- Where Is the Particle in a Box Used in Real Life?
- Going Deeper: Boxes in Two and Three Dimensions
- Practice Particle in a Box Problems
- Common Misconceptions
- Key Facts
- Quiz
- FAQ
What Is a Particle in a Box?
The particle in a box is a thought experiment that strips quantum mechanics down to its bare bones. Imagine a single particle, such as an electron, that can move freely along a straight line but is fenced in by two walls a distance L apart. Inside, nothing pushes or pulls on it. At the walls, the potential energy jumps to infinity, so the particle can never get out.
Physicists also call this setup the infinite square well, because a graph of the potential energy looks like a flat-bottomed well with endlessly tall sides. In classical physics the answer would be boring: a ball bouncing between two walls can have any speed and any energy you like. Quantum mechanics says something very different.
Once the particle is treated as a wave, only certain wave patterns fit between the walls. Each pattern has its own energy, so the energy can take only a ladder of separate values. That single result, called energy quantization, is the heart of the model.
Particle in a Box Explained Simply
Think of a jump rope held tight by two friends. If you shake it, you can make one big hump, or two humps, or three, but never one and a half. The ends are pinned, so only whole numbers of half-waves fit.
A trapped electron behaves the same way. Its wave must fade to zero at both walls, so only a few wave shapes are allowed. More humps mean a shorter wavelength, and in quantum physics a shorter wavelength means more energy. That is why the electron cannot sit at just any energy. It has to stand on one rung of an energy ladder.
There is one more surprise. The electron can never be completely still. Even on the lowest rung it carries some energy, because a wave squeezed into a small space must wiggle at least a little.
Why Is the Energy of a Particle in a Box Quantized?
The particle's state is described by a wave function, written ψ(x). Because the particle can never be found inside or beyond the walls, ψ must equal zero at x = 0 and at x = L. Between the walls, solving the Schrödinger equation with zero potential energy gives simple sine waves.
A sine wave that is zero at both ends has to fit a whole number of half-wavelengths into the box. That gives the condition
Put those three steps together and the energy comes out in steps labeled by the whole number n. Nothing forces the steps in by hand. They appear automatically once the wave is required to vanish at the walls.

What Is the Formula for the Energy Levels?
The allowed energies of a particle of mass m in a one-dimensional box of width L are
Three patterns stand out. Energy grows with n², so the second level is four times the first and the third is nine times the first. Energy falls with L², so halving the box width makes every level four times higher. And energy falls with mass, so a heavy particle has levels packed so closely that they blur into a smooth range.
For a full collection of related equations, from photon energy to the Bohr levels, see our modern physics formulas sheet.
Here is the energy formula with each symbol and its SI unit, plus the rearranged forms for box width and quantum number. Energies are usually converted to electronvolts, where 1 eV = 1.602 176 634 × 10⁻¹⁹ J.
| Symbol | Quantity | SI unit |
|---|---|---|
| energy of level n | joule (J) | |
| quantum number (1, 2, 3, ...) | dimensionless (1) | |
| Planck constant (6.626 × 10⁻³⁴ J·s (exact: 6.62607015 × 10⁻³⁴)) | joule second (J·s) | |
| mass of the particle | kilogram (kg) | |
| width of the box | meter (m) |
Rearranged to find another variable:
Valid for: infinite square well (1D).
Example 1 Ground state of an electron in a 2 nm box
An electron (m = 9.109 383 7139 × 10⁻³¹ kg) is trapped in a one-dimensional box 2.0 nm wide. Using h = 6.626 070 15 × 10⁻³⁴ J·s, what is its lowest allowed energy in electronvolts?
- Given:
- quantum number (1, 2, 3, ...):
- Planck constant:
- mass of the particle:
- width of the box:
- quantum number (1, 2, 3, ...):
- Formula:
- Substitute:
- Answer:
This is a quarter of the value for a 1 nm box, because the energy scales with 1/L².
What Do the Wave Functions Look Like?
Inside the box, the normalized wave functions are
What you can measure is not ψ itself but its square, |ψ|², which gives the probability of finding the particle at each point. For n = 1 the particle is most likely near the middle and least likely near the walls. For n = 2 it is never found at the exact center, even though it spends time on both sides. A classical ball would show no such pattern; it would be equally likely to be anywhere.
The diagram below draws the n = 3 state. Its three half-waves give two interior nodes, the places where the particle has zero chance of being detected.

Why Can't the Particle Have Zero Energy?
Setting n = 0 would make ψ zero everywhere, which means no particle at all, so the lowest allowed level is n = 1. Its energy,
The uncertainty principle gives the same message from another angle. Trapping the particle in a width L pins down its position, so its momentum cannot be exactly zero. A spread in momentum means some kinetic energy, and the tighter the box, the larger that leftover energy has to be.
How Do Box Size and Mass Change the Energy?
Because E depends on 1/(mL²), the model explains why quantum effects matter for electrons in atoms but vanish for everyday objects. An electron in a box 1 nm wide has a ground-state energy of about a third of an electronvolt, comparable to chemical energies. The table below lists its first five levels, all computed from the formula.
Now try a 50 g marble rolling in a 10 cm groove. Plugging in those numbers gives a ground-state energy of roughly 10⁻⁶⁴ J, so tiny that the gaps between levels can never be noticed. The marble seems to have a continuous range of energies, which is exactly what classical physics assumes. Our classical vs quantum physics comparison explores where that boundary lies.
Example 3 How wide must the box be?
You want an electron's ground-state energy in a box to be exactly 1.0 eV, which is 1.602 176 634 × 10⁻¹⁹ J. With n = 1, h = 6.626 070 15 × 10⁻³⁴ J·s and m = 9.109 383 7139 × 10⁻³¹ kg, how wide must the box be, in nanometers?
- Given:
- quantum number (1, 2, 3, ...):
- Planck constant:
- mass of the particle:
- energy of level n:
- quantum number (1, 2, 3, ...):
- Formula:
- Substitute:
- Answer:
A box only a few atoms wide is enough to give an electron a ground-state energy of about one electronvolt.
| Level n | Energy (eV) | Compared with n = 1 | Nodes inside the box |
|---|---|---|---|
| 1 | 0.3760 | 1× | 0 |
| 2 | 1.504 | 4× | 1 |
| 3 | 3.384 | 9× | 2 |
| 4 | 6.016 | 16× | 3 |
| 5 | 9.401 | 25× | 4 |
| Source: Computed with E = n²h²/(8mL²) using h and the electron mass from NIST CODATA 2022 · Retrieved October 2026 | |||
How Does a Particle in a Box Absorb or Emit Light?
A particle can jump from one level to another by absorbing or giving off a photon whose energy matches the gap exactly. Going from level ni down to nf releases
The gaps widen as n grows, because n² climbs faster than n. This is the opposite of the hydrogen atom, where the energy levels crowd together near the top. Comparing the two shows how the shape of the trap controls the spacing of the rungs.
Example 2 Light from a jump between levels
An electron in a 1.2 nm box drops from the n = 2 level to the n = 1 level and emits one photon. Using h = 6.626 070 15 × 10⁻³⁴ J·s, c = 299 792 458 m/s and the electron mass 9.109 383 7139 × 10⁻³¹ kg, what is the photon's wavelength in nanometers?
- Given:
- Planck constant:
- speed of light in vacuum:
- m:
- L:
- n_i:
- n_f:
- Planck constant:
- Formula:
- Substitute:
- Answer:
This photon lands in the near infrared; a narrower box would push the light toward the visible band.
Where Is the Particle in a Box Used in Real Life?
Real traps never have infinitely hard walls, yet the simple model still gives useful estimates:
- Quantum dots. These semiconductor crystals, only a few nanometers across, glow in colors set by their size. Smaller dots have wider level gaps and emit bluer light, just as 1/L² predicts.
- Dye molecules. In long chain molecules with alternating single and double bonds, some electrons roam along the chain almost freely. Treating the chain as a box predicts roughly which colors the dye absorbs.
- Nanowires and thin films. When one dimension of a material shrinks to a few nanometers, electrons are confined in that direction and the material's electrical and optical behavior shifts.
- Nuclei. A proton confined to a region about the size of a nucleus has level spacings in the millions of electronvolts, which hints at why nuclear energies dwarf chemical ones.
When a wall is finite rather than infinite, the wave leaks a short distance into it, and a thin enough barrier lets the particle escape. That leak is the starting point for quantum tunneling.

Going Deeper: Boxes in Two and Three Dimensions
A particle in a rectangular three-dimensional box has one quantum number for each direction, and its energy is the sum of three one-dimensional terms:
The same counting of states inside a box is used to model electrons in a metal and photons in a hot oven. Related models, such as the quantum harmonic oscillator, replace the hard walls with a smooth spring-like potential and produce evenly spaced levels instead.
Practice Particle in a Box Problems
Work through a few level and wavelength calculations on your own, then check the photon side of each jump with the photon energy calculator. Our atomic structure worksheets add printable practice on energy levels and quantum numbers, and the Erwin Schrödinger profile tells the story behind the wave equation this model solves.
Common Misconceptions
Myth: A particle in its lowest state is sitting still at the bottom of the box.
Physics: The ground state has a nonzero zero-point energy. The particle cannot have zero momentum while it is confined to a finite width.
Myth: The energy levels are evenly spaced, like rungs on a normal ladder.
Physics: The levels grow as n², so the gaps get wider as you go up: the jump from 2 to 3 is bigger than the jump from 1 to 2.
Myth: The particle is most likely to be found near the walls, where it turns around.
Physics: In the ground state the probability is highest at the center and drops to zero at the walls, the opposite of a slow classical ball near its turning points.
Myth: The model only applies to imaginary boxes and has no real use.
Physics: It gives good first estimates for quantum dots, conjugated dye molecules and thin semiconductor layers, and it is the starting point for more realistic wells.
Key Facts
- A particle in a box is a particle trapped between two infinitely high walls, also called an infinite square well.
- Its allowed energies are E = n²h²/(8mL²), where n is a whole number starting at 1.
- Energy rises with the square of n, so the third level has nine times the energy of the first.
- A narrower box or a lighter particle gives larger energies and wider gaps between levels.
- The lowest energy is never zero; this leftover zero-point energy comes from confinement.
- The wave functions are sine waves that fit a whole number of half-wavelengths between the walls.
- Quantum dots and dye molecules behave roughly like particles in a box, which is why their colors depend on size.
Quick Quiz: How Well Do You Know Particle in a Box?
6 questions. Tap an answer to check it.
How does the energy of level n = 3 compare with the ground state?
Energy scales with n², and 3² = 9.
What happens to the ground-state energy if the box width is halved?
Energy depends on 1/L², so halving L multiplies the energy by four.
Why is the lowest allowed quantum number n = 1 and not n = 0?
A wave function that is zero everywhere describes no particle, so n = 0 is not a valid state.
In the n = 2 state, where is the particle never found?
The n = 2 wave function has a node at the center, where the probability is zero.
Which change makes the energy levels of a particle in a box closer together?
Energy is proportional to 1/m, so a heavier particle has smaller energies and smaller gaps.
Why do smaller quantum dots glow bluer?
A smaller box means larger level spacings, and higher-energy photons have shorter, bluer wavelengths.
Frequently Asked Questions
What is a particle in a box in simple terms?
It is a particle, usually an electron, that can move freely along a line but is trapped between two walls it can never cross. Quantum mechanics treats it as a wave that must vanish at the walls. Only certain wave shapes fit, so the particle can only have certain energies. It is the simplest example of how confinement creates quantized energy.
What is the formula for a particle in a box?
The allowed energies are E_n = n^2 h^2 / (8 m L^2), where n is 1, 2, 3 and so on, h is the Planck constant, m is the particle's mass and L is the width of the box. The wave functions are psi_n(x) = sqrt(2/L) sin(n pi x / L). Energies are usually converted from joules to electronvolts for small particles like electrons.
Why can't n be zero for a particle in a box?
With n = 0 the sine function would be zero everywhere inside the box, which means the probability of finding the particle anywhere is zero. That describes no particle at all, so it is not a valid state. The smallest allowed value is n = 1, and that is why the ground state always carries a nonzero zero-point energy.
What happens to the energy levels if the box gets bigger?
Every level drops, because the energy depends on 1 over L squared. Doubling the width cuts each energy to one quarter and squeezes the levels closer together. For a very wide box the gaps become so small that the energy looks continuous, which is how quantum results smoothly turn into classical behavior for large systems.
Is the particle in a box a real system?
No real wall is infinitely high, so the model is an idealization. Still, it describes several real systems well enough to be useful, including electrons in quantum dots, electrons moving along long conjugated molecules, and carriers in very thin semiconductor layers. Engineers and chemists use it for quick estimates before turning to more detailed calculations.
What is the probability of finding the particle in the middle of the box?
It depends on the level. In the ground state the probability density peaks at the center, so the middle is the most likely place. In the n = 2 state there is a node at the center, so the chance of finding the particle exactly there is zero. Odd values of n have a peak in the middle and even values have a node.
How is a particle in a box different from a classical ball in a box?
A classical ball can have any energy, including zero, and is equally likely to be found anywhere along its path. A quantum particle can only take discrete energies, never zero, and its probability of being found varies from place to place, with nodes where it is never detected. The differences fade as the mass or box size grows.
What is the difference between an infinite and a finite square well?
In an infinite square well the walls are impossibly high, so the wave function is exactly zero outside. In a finite well the walls have a limited height, so the wave function leaks a little way into them and the energies come out slightly lower. A finite well also has only a limited number of trapped levels, and a particle can tunnel through a thin wall.
Sources
Constants come from NIST CODATA 2022 (public domain) and unit definitions from the BIPM SI Brochure (CC BY 4.0). Text, diagrams and illustrations are original work by Physics Tribune.








