Sailing Upwind and Tacking, Explained

After reading this you will understand why a boat cannot sail straight into the wind, how the polar diagram sets your best angle, and why the number that wins races upwind is velocity made good, not raw speed.

What the simulator models

Point a boat at the wind and it stops. Turn away a little and it starts moving. Turn to roughly 45 degrees off the wind and it moves fast, but not toward where the wind comes from. That geometric fact controls the whole game. To reach a mark that sits directly upwind, you cannot sail there in a straight line. You zig-zag: sail at an angle on one side, turn through the wind, sail at the mirror angle on the other side. Each turn is a tack, and each tack costs speed while the sails flap and reset.

The simulator draws a top-down course with a live wind field. The wind is not constant. It swings back and forth in direction (an oscillation) and pulses in strength (a gust). Your boat obeys a polar diagram: a lookup table of boat speed as a function of the angle between your heading and the wind. A route optimizer sails the same wind beside you, choosing tack timing to maximize progress upwind. Your target is the windward mark, and your score is the time to reach it.

The hook is simple. If the wind shifts in your favour and you turn onto the new angle one second before the router notices, you gain ground the router cannot recover. That is racing tactics in one sentence.

When this model helps, and when it does not

Use the simulator to build intuition about three things: the trade-off between pointing high and going fast, the arithmetic of velocity made good, and why catching wind shifts matters more than trimming sails perfectly. Those lessons transfer directly to dinghy and keelboat racing.

Do not treat it as a rigging or boat-design tool. The polar diagram here is a smooth idealisation. Real polars change with wave state, crew weight, sail choice and current. The model ignores heel, leeway (the sideways slip of the hull), tide, and the physics of why a sail produces lift at all. It is a tactics trainer, not a naval architecture package.

The wind field is a toy: a mean direction plus a slow sinusoidal oscillation plus random gusts. Real breeze has geographic bends, thermal gradients and persistent shifts that this model does not attempt. The tactical reasoning still holds, which is the point.

The polar diagram and velocity made good

The polar diagram gives boat speed v as a function of the true wind angle \theta, the angle between your heading and the direction the wind blows from. A reasonable model for a fixed wind strength is:

v(\theta) = v_{max} \cdot \sin\left(\frac{180 \cdot (\theta - \theta_0)}{\theta_r - \theta_0}\right)

Here \theta_0 is the no-go angle, the closest you can point to the wind before the sails stall (about 30 to 45 degrees for most boats). Below it, speed is zero. \theta_r is the run angle, straight downwind at 180 degrees where speed also drops. v_{max} is the top speed, reached on a reach somewhere in the middle. The sine shape is a stand-in for a measured curve, chosen so that speed is zero at both extremes and peaks between them.

What matters upwind is not v but its component pointing at the mark. If the mark is dead upwind, that component is velocity made good:

\text{VMG} = v(\theta) \cdot \cos(\theta)

The \cos(\theta) factor projects your speed onto the upwind axis. Point higher (smaller \theta) and \cos(\theta) grows, but v(\theta) shrinks toward the no-go zone. Bear away (larger \theta) and you go faster but waste speed sideways. The best upwind angle maximizes the product, and it is not the highest you can point.

A worked example with the default wind

Finding the best upwind angle

Take the demo defaults: top speed v_{max} = 6 knots, no-go angle \theta_0 = 40 degrees, run angle \theta_r = 180 degrees, mark dead upwind. Compute speed and VMG at several angles.

  1. At \theta = 45: the sine argument is 180 * (45 - 40) / (180 - 40) = 6.43 degrees, so v = 6 \cdot \sin(6.43^\circ) = 0.672 knots. VMG = 0.672 \cdot \cos(45^\circ) = 0.475 knots.
  2. At \theta = 60: argument 25.7 degrees, v = 6 \cdot \sin(25.7^\circ) = 2.60 knots. VMG = 2.60 \cdot \cos(60^\circ) = 1.30 knots.
  3. At \theta = 75: argument 45.0 degrees, v = 6 \cdot \sin(45^\circ) = 4.24 knots. VMG = 4.24 \cdot \cos(75^\circ) = 1.10 knots.
  4. At \theta = 90: argument 64.3 degrees, v = 6 \cdot \sin(64.3^\circ) = 5.41 knots. VMG = 5.41 \cdot \cos(90^\circ) = 0 knots.

The peak sits near 60 degrees, giving 1.30 knots toward the mark even though the boat only makes 2.60 knots through the water. Pointing at 45 degrees looks aggressive and closer to the mark, but it delivers 0.475 knots of real progress, less than half. Bearing all the way to 90 degrees is fast (5.41 knots) but makes zero upwind progress. The optimum is the compromise, and the tool draws it live.

VMG rises from the no-go zone, peaks near 63 degrees at about 1.32 knots, then falls back to zero at 90 degrees. The marker shows the optimal beating angle for these defaults.

With top speed 6 knots and no-go angle 40 degrees, boat speed follows a sine from 0 at 40 degrees to 6 at 110 degrees back toward 0 at 180 degrees. VMG is that speed times the cosine of the angle. VMG peaks near 63 degrees at about 1.32 knots, well off the highest pointing angle.

Why wind shifts win races

An oscillating wind swings around a mean direction. Suppose the mean is due north and the wind oscillates plus or minus 10 degrees with a slow period. On starboard tack you sail 60 degrees off the wind. When the wind backs (rotates left), your heading toward the mark improves: you are lifted. When it veers (rotates right), you are headed and losing ground.

The rule is: tack on the headers, sail the lifts. Every time you get headed, you turn onto the other tack, where the same shift becomes a lift. Do this through each oscillation and you gain a slice of upwind distance per cycle. Ignore the shifts and you average out, sailing the long way.

Quantify one cycle. With a 10 degree shift and a boat doing 2.6 knots at 60 degrees, staying on a headed tack for 30 seconds costs roughly the difference in VMG. At 70 degrees VMG is 1.23 knots; at 50 degrees it is 0.895 knots. Sailing the lifted 50 degree angle for 30 seconds nets 1.23 * 30 / 3600 = 0.01025 nautical miles, versus 0.895 * 30 / 3600 = 0.00746 on the wrong side. That 0.0028 nm gap per half-cycle compounds over a leg into a decisive lead.

Watch the apparent-wind vector and the laylines the tool draws. When a shift lifts you above the layline, you can tack straight for the mark. Tacking exactly at the layline, not before, is the single habit that saves the most distance.

Cumulative upwind distance when you tack on every header. Shaded bands are lifted phases where progress steepens. Over six minutes the shift-sailor is about 0.11 nm ahead of a boat that ignores the oscillation.

Reading the live displays

Apparent wind
The wind you actually feel, the vector sum of true wind and the wind created by your own motion. It always sits forward of the true wind, which is why sails are trimmed tighter than beginners expect.
Laylines
The two lines from the mark at your best tacking angle. Once you cross a layline you have overstood: you are aiming past the mark and wasting distance. Reach the layline and tack, no sooner.
VMG readout
Your current speed times the cosine of your angle to the mark. Steer to make this number as large as you can; ignore the temptation to point higher for a better-looking heading.
Router ghost
The optimizer sailing the same wind with perfect tack timing. If it pulls ahead, you either oversteered, missed a shift, or tacked too often.

Common mistakes

The first mistake is pinching: sailing too close to the wind because the mark looks nearer that way. The worked example showed 45 degrees delivers 0.475 knots of VMG against 1.30 knots at 60 degrees. You feel closer and go slower.

The second is tacking too often. Each tack costs speed while the boat turns through the no-go zone and rebuilds momentum. If a tack costs you two boat-lengths and the shift only gains one, do not tack. Tack on genuine, sustained headers, not on every twitch of the breeze.

The third is overstanding the layline. Sailing past the layline means you approach the mark on a slower, wider angle than needed. The tool draws the laylines precisely so you can tack on them.

Chasing gusts by bearing away for raw speed feels great and loses the race. A gust that lifts your speed from 2.6 to 3.2 knots at 60 degrees raises VMG from 1.30 to 1.60 knots only if you hold the angle. Bear away to 90 degrees in the same gust and VMG collapses to zero. Speed without direction is wasted.

Related simulators on this site

If you like watching simple rules produce complex behaviour, several other models here scratch the same itch. The Predator–Prey Simulator shows boom-and-bust cycles from two coupled equations, much like the oscillating wind drives your tacking rhythm. The Traffic Jam Simulator turns local decisions into emergent jams. For agents optimising under trade-offs, the Pareto Frontier Evolution tool traces the same kind of best-compromise curve that your VMG peak represents. The Forest Fire Model and the SIR Epidemic Simulator round out the collection of small models with sharp lessons.

Frequently asked questions

Why can a boat not sail straight into the wind?

A sail generates useful force only when the wind flows across it at an angle. Point straight at the wind and both sides of the sail see the same flow, so there is no net force forward and the sail luffs. The no-go zone in the model runs from 0 to about 40 degrees off the wind, where speed is set to zero.

What is the difference between speed and VMG?

Speed is how fast you move through the water. VMG is the part of that speed pointing at the mark, computed as speed times the cosine of your angle to the mark. Upwind you optimise VMG, not speed. In the worked example the fastest useful angle (60 degrees, 2.6 knots) beats the highest-pointing angle (45 degrees, 0.672 knots) on VMG by nearly three to one.

How do I beat the router?

The router reacts to shifts with a small delay because it confirms a shift before committing. If you read a header early and tack before it does, you gain the distance it sails on the wrong tack. You will not out-trim the router; you beat it by anticipating one shift.

Does downwind sailing also use zig-zags?

Yes. Dead downwind at 180 degrees the sine model gives zero speed, so fast boats sail broad angles and gybe back and forth, maximising downwind VMG with speed times the cosine of the angle from straight downwind. The same arithmetic applies, mirrored.

Are the polar numbers realistic?

They are the right shape but simplified. Real polars are measured per wind strength and bend differently near the extremes. The 6 knot top speed and 40 degree no-go used here are typical of a small keelboat, chosen so the tactical lessons come through cleanly.