PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

More from Thermodynamics

Other simulators in this category — or see all 31.

View category →
NewSchool

Thermal Expansion

Linear ΔL = α L₀ ΔT; compare reference bar and heated/cooled length (schematic).

Launch Simulator
NewSchool

Brownian Motion

Heavy particle with random kicks and friction; trail and running ⟨r²⟩ vs time.

Launch Simulator
NewSchool

Otto Cycle

PV diagram: adiabatic compression/expansion and isochoric heat; η = 1 − r^{1−γ}.

Launch Simulator
NewSchool

Gas Mixing & Entropy

Two species separated then mixed; ΔS = 2nR ln 2 for equal volumes and moles.

Launch Simulator
NewSchool

Stirling Cycle

PV: two isotherms and two isochores; ideal η equals Carnot with a perfect regenerator.

Launch Simulator
NewSchool

Wet Steam (T–s sketch)

Vapor dome, horizontal isobar in two-phase region, quality x and superheat sketch.

Launch Simulator
PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Thermodynamics/Maxwell–Boltzmann Distribution

Maxwell–Boltzmann Distribution

The Maxwell–Boltzmann distribution describes the statistical spread of molecular speeds in an ideal gas at thermal equilibrium. This simulator visualizes the core probabilistic relationship between the microscopic motion of particles and macroscopic temperature. At the heart of the model is the fact that in three dimensions, each component of a particle's velocity (v_x, v_y, v_z) is independently distributed according to a Gaussian (normal) distribution, centered on zero with a variance proportional to the temperature. The simulator draws random samples from these three Gaussian distributions for a large number of 'particles,' calculates each particle's speed (|v| = sqrt(v_x² + v_y² + v_z²)), and bins these speeds into a histogram. This empirical histogram is then compared directly to the theoretical Maxwell–Boltzmann speed probability density function (PDF): f(v) = √(2/π) (m/(k_B T))^(3/2) v² exp(–mv²/(2k_B T)). The model assumes an ideal gas of identical, non-interacting point particles in equilibrium, neglecting intermolecular forces and any external fields. By adjusting the temperature (T) and the number of sampled particles, students can observe how the distribution's shape, peak (most probable speed), and width change. They learn that temperature is a measure of the average kinetic energy (⟨½mv²⟩ = (3/2)k_B T) and can directly verify relationships between the most probable, average, and root-mean-square speeds. The simulator bridges the gap between abstract probability theory and tangible statistical mechanics, demonstrating how a simple Gaussian assumption in each Cartesian component leads to the non-Gaussian, skewed speed distribution observed in physical systems.

Who it's for: Undergraduate students in introductory thermodynamics, statistical mechanics, or physical chemistry courses, as well as educators seeking to demonstrate the connection between probability distributions and physical observables.

Key terms

  • Maxwell–Boltzmann Distribution
  • Probability Density Function (PDF)
  • Root-Mean-Square Speed
  • Most Probable Speed
  • Kinetic Theory of Gases
  • Gaussian Distribution
  • Thermal Equilibrium
  • Ideal Gas

Temperature & sampling

1
6000

Each velocity component is Gaussian with variance σ² ∝ kT/m. The speed magnitude then follows the Maxwell–Boltzmann law — the same idea as kinetic theory behind the ideal gas, shown here as histogram vs the exact curve.

Measured values

⟨|v|⟩ (sample)1.594
v_rms (sample)1.732
v_mp theory1.414
⟨v⟩ theory1.596

How it works

In equilibrium, classical particles in 3D have Gaussian momentum components. The distribution of speed |v| = √(v_x²+v_y²+v_z²) is not Gaussian: it rises from zero, peaks near the most probable speed, then falls exponentially.

Key equations

f(v) = 4π (m / 2πkT)^{3/2} v² exp(−mv² / 2kT)

Frequently asked questions

Why is the speed distribution not a bell curve (Gaussian) like the individual velocity components?
The distribution of a single velocity component is Gaussian, but speed (v = √(v_x²+v_y²+v_z²)) is a positive quantity derived from three independent Gaussians. The probability of finding a particle with a given speed v is proportional to the surface area of a sphere of radius v in velocity space (4πv²) multiplied by the Gaussian probability density at that radius. The v² term causes the distribution to start at zero, peak, and then decay exponentially, creating its characteristic skewed shape.
What does increasing the temperature actually do to the gas molecules?
Increasing temperature increases the average kinetic energy of the molecules. In the simulator, this is seen as a broadening and shifting of the speed distribution to higher speeds. The entire curve becomes flatter and wider, meaning a greater fraction of molecules have very high speeds. This explains phenomena like increased rates of chemical reaction and evaporation with temperature.
Why does the histogram sometimes look 'lumpy' and not perfectly smooth like the theoretical curve?
The histogram is built from a finite number of random samples. With a small sample size (e.g., 100 particles), statistical fluctuations are significant, making the histogram jagged. This is a key lesson in statistics: the theoretical PDF describes the probability for an infinite ensemble. Increasing the sample size in the simulator reduces these fluctuations, causing the histogram to converge smoothly onto the predicted curve, illustrating the Law of Large Numbers.
Is the Maxwell–Boltzmann distribution applicable to real gases?
It is an excellent approximation for real gases under ordinary conditions (low density, moderate temperatures) where intermolecular forces are negligible. At very high densities or near condensation points, interactions between particles become significant, and the distribution can deviate. It also assumes the gas is in thermal equilibrium, meaning it does not describe systems with strong temperature gradients or flows.