Explore the Hubble's Law & Redshift Lab
Watch a galaxy's spectral lines redshift with distance, plot a Hubble diagram, and measure the expansion rate of the universe for yourself.
- Free to use
- No signup
- Nothing to install
- Runs in your browser
Illustration. Open the tool for the real thing.
See it in action
The Hubble's Law & Redshift Lab with sample data entered and the result showing.

What is the Hubble's Law & Redshift Lab?
Watch a galaxy's spectral lines redshift with distance, plot a Hubble diagram, and measure the expansion rate of the universe for yourself. It runs in your browser, so a change to a setting or a drag on an object shows up at once.
Astronomers use Hubble's law and redshift surveys of thousands of galaxies to map the large-scale structure of the universe and to estimate its age from the inverse of the Hubble constant.
3 steps to your result
Open the tool and follow along. Nothing to install.
What you get
Redshift is measured from a spectral line's shift: z = (observed wavelength minus rest wavelength) divided by rest wavelength.
For distant galaxies, recession velocity follows v ≈ z × c (the low-redshift Doppler approximation).
Hubble's law says v = H₀ × d: the farther a galaxy, the faster it appears to recede, because space itself is expanding between us and it.
Add five galaxies at very different distances and watch the Hubble diagram form a line.
Drag your H₀ slider until it lines up with your own plotted points.
Push one galaxy far out and watch the spectral line shift much further toward red.
Used for
Pick one to see how it fits.
Teachers
For teachers: project the Hubble's Law & Redshift Lab on the board, let students predict the result, then run it together and test this: Drag your H₀ slider until it lines up with your own plotted points. For students: change one thing at a time and write down what changes.
Try it freeHow it compares
A plain look at this tool next to the usual alternative.
| This simulation | Textbook diagram | |
|---|---|---|
| Interactive | Drag, tap and change settings | Fixed picture |
| Install | Nothing to install | Not needed |
| Cost | Free to use | Depends on the book |
Questions people ask
Why does a bigger redshift mean a more distant galaxy?
Hubble's law, v = H0 d, means recession velocity grows with distance; since redshift z is essentially a measure of that recession velocity, a larger z corresponds to a larger v and therefore a larger d.
Why do real astronomers get slightly different values for H₀ depending on their method?
Different techniques (nearby supernova distance ladders versus the cosmic microwave background) measure the expansion rate through different physics and different eras of the universe, and their results disagree by a few percent - an unresolved discrepancy called the Hubble tension.
Is the Hubble's Law & Redshift Lab free to use?
Yes. The Hubble's Law & Redshift Lab is free, needs no signup or download and runs in your web browser. It is part of the Astronomy group of AZRS simulations.
Does the Hubble's Law & Redshift Lab work on a phone or tablet?
Yes. The Hubble's Law & Redshift Lab takes touch input as well as mouse input, so you can use its 2 adjustable settings with a finger. A larger screen makes the controls and graphs easier to read.
How do I use the Hubble's Law & Redshift Lab?
1. In the Hubble's Law & Redshift Lab, use the controls to change Galaxy distance (Mpc), Your H₀ estimate (km/s/Mpc). The simulation reacts instantly. 2. In the Hubble's Law & Redshift Lab, press "Add this galaxy to plot", "Clear plot", "Add 5 random galaxies" to start, reset or change what is happening. 3. Start with this experiment: Add five galaxies at very different distances and watch the Hubble diagram form a line. Drag any glowing handle, object or slider with your mouse or finger and the Hubble's Law & Redshift Lab responds in real time. 4. Change one setting at a time and watch which readout moves, then compare it with this idea: Redshift is measured from a spectral line's shift: z = (observed wavelength minus rest wavelength) divided by rest wavelength.
More free tools
Related to the Hubble's Law & Redshift Lab.
Try the Hubble's Law & Redshift Lab now
Watch a galaxy's spectral lines redshift with distance, plot a Hubble diagram, and. Free to use.
Try it free