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

More from Astronomy & The Sky

Other simulators in this category — or see all 51.

View category →
NewUniversity / research

Hydrogen Saha Equilibrium (recombination)

n_p n_e / n_H vs T and ionized fraction X; steep Boltzmann knee ~3000 K scale (density dependent).

Launch Simulator
NewUniversity / research

Chandrasekhar limit (Lane–Emden toy)

White-dwarf M–R track for n = 3/2 cold degenerate electrons; UR n = 3 marks the ~1.44 M☉ scale (μ_e dependent).

Launch Simulator
NewUniversity / research

Neutron star TOV: toy M–R (polytrope)

Schwarzschild TOV for polytropes n = 1 or 3/2; K normalized so the ρ_c scan peaks near ~2 M☉ (schematic only).

Launch Simulator
NewSchool

Galaxy Rotation Curve

Keplerian decline vs flat v(r); toy halo slider (dark matter motivation).

Launch Simulator
NewSchool

Stellar Life Cycle

Cloud → MS → giant/SN → WD / NS / BH vs initial mass (schematic).

Launch Simulator
NewSchool

Exoplanet Radial Velocity

K from masses & P; sinusoidal V_r(t); M sin i.

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/Astronomy & The Sky/Hubble Diagram (SN Ia & ΛCDM fit)

Hubble Diagram (SN Ia & ΛCDM fit)

Type Ia supernovae (after standardization) map to a luminosity distance D_L(z) in a spatially flat ΛCDM cosmology with Ω_m + Ω_Λ = 1. The comoving line-of-sight distance is χ = (c/H₀)∫₀^z dz′/E(z′) with E(z) = √(Ω_m(1+z)³ + Ω_Λ), and D_L = (1+z)χ. The distance modulus μ = 25 + 5 log₁₀(D_L / 1 Mpc) is plotted against redshift z — the classic Hubble diagram. This page uses a trapezoid rule integrator and a coarse grid plus greedy local steps to fit (H₀, Ω_m) to scattered toy points; it omits Malmquist bias, host-galaxy extinction, and the full SALT2/STRETCH calibration chain used in real cosmology papers.

Who it's for: Introductory cosmology after distance modulus and FLRW kinematics; pairs with the FLRW expansion and cosmic distance ladder pages.

Key terms

  • Hubble diagram
  • Type Ia supernova
  • distance modulus
  • luminosity distance
  • flat ΛCDM
  • dark energy

ΛCDM curve (manual)

67.4
0.315

Fit minimizes Σ(m−μ)² over a grid + local steps; assumes Gaussian scatter in m only.

Demo data generator

42
0.015
1.05
0.14
67.4
0.315
2026

Demo draws log-uniform z in [z_min, z_max] around truth (H₀, Ω_m) with Gaussian σ_m.

Shortcuts

  • •Click empty area — add SN point (z, m)
  • •Drag near a point — move it
  • •Shift+click — delete nearest
  • •R — reload demo cloud (new seed)

Measured values

SN points42
RMSE (m vs curve)0.138mag
Last fit H₀—
Last fit Ω_m—

How it works

Type Ia supernovae trace the luminosity distance D_L(z) through their standardized apparent magnitudes. In a spatially flat ΛCDM model with Ω_m + Ω_Λ = 1, the line-of-sight comoving distance is χ = (c/H₀)∫₀^z dz′/E(z′) with E = √(Ω_m(1+z)³ + Ω_Λ), and D_L = (1+z)χ. The distance modulus μ = m − M = 25 + 5 log₁₀(D_L / 1 Mpc) is plotted vertically vs z. Adjust H₀ and Ω_m to slide the gold curve, or press Fit flat ΛCDM for a coarse grid + local search that minimizes the mean squared residual in m (toy errors only — no Malmquist bias, no stretch correction).

Frequently asked questions

Why is the fit only in (H₀, Ω_m)?
Absolute magnitude M is degenerate with a vertical shift in m at fixed z; this toy holds M fixed inside the generated “truth” and fits geometry only. Real analyses marginalize over nuisance parameters and use larger compilations.
Does this include radiation or curvature?
No — flatness is enforced with Ω_Λ = 1 − Ω_m, and radiation is ignored so the integrand matches the same late-universe teaching model as the FLRW expansion page.