← All Learnsy lessons

Learnsy lesson 3 · Earth science

How tides work

The Moon does not simply “pull water toward it.” Its gravity stretches the whole Earth–ocean system. Add the Sun, spin Earth through the two bulges, and the daily rhythm of high and low water appears.

Drag through one lunar month

When gravity lines up—and when it doesn’t

Scrub time to orbit the Moon. Watch the lunar and solar tide patterns add together, then compare the resulting water-level curve.

Interactive Sun, Earth, and Moon tide diagram The Moon orbits Earth as the selected lunar day changes. Water bulges show the combined lunar and solar tide, while a coral marker follows one coast through a tidal day. SUN EARTH MOON Diagram is not to scale

The coral marker follows one coast as Earth turns. The exaggerated water shape is useful for understanding the forces, not for predicting a particular harbor.

Day 0.0 of 29.5
0.0 h · high tide
One coast moving through the tidal bulgesidealized semidiurnal coast
water levelmean water levelselected coast now

01 · Stretch

Why two bulges?

The near side feels the Moon’s gravity more strongly than Earth’s center. The far side feels it less strongly. Relative to the center, ocean water is stretched along the Earth–Moon line in both directions.

02 · Rotate

Why tides repeat

As Earth rotates under those bulges, a coast passes through high, low, high, then low water. Because the Moon moves along its orbit each day, Earth needs about 50 extra minutes to face it again.

03 · Combine

Why the range changes

The Sun also raises tides. At new and full moon its pattern lines up with the Moon’s: spring tides. At quarter moons they cross: smaller neap tides.

The key is a difference in gravity

Uniform gravity would accelerate Earth and its ocean together. Tides arise because gravity changes across Earth. The leading approximation to tide-raising acceleration scales like:

tidal effect ∝ mass ÷ distance³

The Sun is enormously massive, but it is very far away. The nearby Moon therefore raises a stronger tide. Distance is cubed, so a modest distance change matters a lot.

“Spring” has nothing to do with the season

!
Spring tides happen twice every lunar month.
The name means the water “springs” farther through its range. New moon and full moon both produce them.
!
A spring tide is a range, not a single giant wave.
It means a larger difference between high and low water—not a tsunami.

Why real beaches disagree with the diagram

The simple model explains the rhythm, but actual ocean basins slosh. Continents block the bulges, water has inertia and friction, and bays can amplify or delay the response. Some places get one high tide per day; others get two of unequal height.

  • Use a local tide table for timing and height.
  • Wind and air pressure can push observed water away from predictions.
  • Spring tides often arrive a day or two after exact alignment.

The model in TypeScript

A compact version of the simulator: two twice-per-cycle tide terms combine as the Moon changes angle.

type TideState = { day: number; range: number };

function tideState(day: number): TideState {
  const lunarMonth = 29.53;
  const moonAngle = 2 * Math.PI * day / lunarMonth;

  // Moon strength 1.0, Sun strength 0.46.
  // cos(2θ) gives two bulges per orbit.
  const range = Math.sqrt(
    1 ** 2 + 0.46 ** 2 +
    2 * 1 * 0.46 * Math.cos(2 * moonAngle)
  );
  return { day, range };
}