
strokes-gained
com.shottogolf/strokes-gained
Golf strokes gained: expected strokes from any lie, shot-by-shot strokes gained, handicap levels.
Documentation
strokes-gained
Calculate strokes gained in golf, in JavaScript or Python. Expected strokes to hole out from any lie and distance, strokes gained for every shot, hole and round, and how many strokes golfers at each handicap lose to a scratch golfer. Libraries and command line tools with no dependencies, built on Mark Broadie's published PGA Tour tables.
npx strokes-gained hole "tee 410, fairway 150, green 20ft, green 3ft" # npm
pip install strokes-gained # PyPI
1. 410 y tee Off the tee +0.16
2. 150 y fairway Approach +0.17
3. 20 ft green Putting −0.15
4. 3 ft green Putting +0.06
4 on a par 4: +0.24 against a scratch golfer (+0.00 against the PGA Tour)
Off the tee +0.16 · Approach +0.17 · Putting −0.09
Made by Shotto, an AI agent for golf on iPhone and Apple Watch that tracks every shot from what you say and works out your strokes gained.
| Package | Docs | |
|---|---|---|
| JavaScript | strokes-gained on npm | js/README.md |
| Python | strokes-gained on PyPI | python/README.md |
Use it in Claude or ChatGPT
Add https://shottogolf.com/mcp to Claude or ChatGPT as a custom connector. It's free and needs no account. Then ask in plain words: "I drove it to 150 yards in the fairway, hit it to 20 feet and two-putted. What did each shot gain?" The assistant reads your description, and the connector does the maths with these same tables, against a scratch golfer unless you ask for the Tour or a handicap. Its tools are expected_strokes, strokes_gained (one hole or a whole round) and compare_to_handicap.
What is strokes gained?
Strokes gained measures each golf shot against a benchmark: the average number of strokes it takes to hole out from where the ball was. A shot that leaves you somewhere better than the benchmark expects gains strokes, and one that leaves you somewhere worse loses them. Added up over a round, it shows where your strokes are won and lost: off the tee, on approach shots, around the green and on the putting green.
strokes gained = expected strokes before the shot − expected strokes after it − 1
From 150 yards in the fairway a PGA Tour player averages 2.95 strokes to hole out, and from 20 feet on the green 1.87. So hitting it from 150 yards to 20 feet gains 2.95 − 1.87 − 1 = +0.08 strokes: slightly better than the average Tour player. Holing a 3-footer gains 1.04 − 0 − 1 = +0.04, and missing it loses about 0.96.
Mark Broadie developed the method at Columbia Business School and explains it in Every Shot Counts (2014). The PGA Tour has published strokes-gained statistics since 2011, starting with putting. There's a short guide at shottogolf.com/strokes-gained.
Against the Tour, scratch or any handicap
Broadie's tables are the average PGA Tour player, so every number starts there. Against the Tour nearly every amateur is negative, which says little about how a shot compares with golfers like you. So a hole can also be measured against a scratch golfer or any handicap index: that level's strokes per round, in each part of the game, are spread over a round's shots and added to each shot's Tour number. A tee shot or approach is worth about 0.1 more against scratch, and about 0.3 more against a typical 15 handicap.
| Measured against | That par 4 above (two putts from 20 feet) |
|---|---|
| PGA Tour | +0.00 |
| Scratch | +0.24 |
| 5 handicap | +0.40 |
| 15 handicap | +0.78 |
| 20 handicap | +0.99 |
The spread uses a typical round's shots per category (14 drives, 24 approaches, 8 shots around the green, 18 putted holes); pass a golfer's own counts for a closer reading. Putting's adjustment is per putted hole, split across the hole's putts. Shotto's app reads strokes gained the same way, with each golfer's own counts.
Strokes gained tables
Expected strokes to hole out for the average PGA Tour player, from Broadie's tables, and the strokes golfers at each handicap lose to a scratch golfer. Look up the spots before and after any shot and the formula above does the rest. Values between rows are interpolated.
From the fairway, rough, sand and recovery
| Distance | Fairway | Rough | Sand | Recovery |
|---|---|---|---|---|
| 20 yards | 2.40 | 2.59 | 2.53 | 3.51 |
| 30 yards | 2.52 | 2.70 | 2.66 | 3.57 |
| 50 yards | 2.66 | 2.87 | 2.92 | 3.79 |
| 75 yards | 2.74 | 2.95 | 3.23 | 3.84 |
| 100 yards | 2.80 | 3.02 | 3.23 | 3.80 |
| 125 yards | 2.87 | 3.10 | 3.21 | 3.78 |
| 150 yards | 2.95 | 3.19 | 3.25 | 3.80 |
| 175 yards | 3.06 | 3.29 | 3.37 | 3.82 |
| 200 yards | 3.19 | 3.42 | 3.55 | 3.87 |
| 225 yards | 3.35 | 3.56 | 3.74 | 3.93 |
| 250 yards | 3.52 | 3.69 | 3.88 | 4.00 |
From the tee
| Hole length | Expected strokes |
|---|---|
| 150 yards | 2.98 |
| 175 yards | 3.04 |
| 200 yards | 3.12 |
| 350 yards | 3.89 |
| 400 yards | 3.99 |
| 450 yards | 4.13 |
| 500 yards | 4.41 |
| 550 yards | 4.70 |
On the green
| Putt | Expected putts |
|---|---|
| 3 feet | 1.04 |
| 5 feet | 1.23 |
| 8 feet | 1.50 |
| 10 feet | 1.61 |
| 15 feet | 1.78 |
| 20 feet | 1.87 |
| 30 feet | 1.98 |
| 40 feet | 2.06 |
| 60 feet | 2.20 |
Strokes lost to a scratch golfer, by handicap
Per 18 holes, for a typical golfer at each handicap.
| Handicap | Long game | Short game | Sand | Putting | Total |
|---|---|---|---|---|---|
| 5 | −2.2 | −0.8 | −0.2 | −0.8 | −4.0 |
| 10 | −5.2 | −1.9 | −0.4 | −1.4 | −8.8 |
| 15 | −8.1 | −3.0 | −0.5 | −2.0 | −13.7 |
| 20 | −11.2 | −4.3 | −0.7 | −2.9 | −19.2 |
| 25 | −14.3 | −5.8 | −0.9 | −4.0 | −25.1 |
| 30 | −17.5 | −7.3 | −1.1 | −5.1 | −31.0 |
| PGA Tour average | +3.7 | +0.9 | +0.15 | +0.65 | +5.4 |
The long game (tee shots and approaches) is where most of the strokes go at every level: about 8 of a 15-handicap's 14 strokes a round to scratch. The handicap rows come from Broadie's amateur data. We place his scoring groups at handicaps of about 5, 17 and 30, and interpolate between them.
Tracking your own strokes gained
Strokes gained only needs to know where each shot started and where it finished. There are three ways to get that for your own rounds:
- Write it down yourself. Note each shot's lie and distance on the card or in a spreadsheet, then let these packages do the maths.
- Put sensors on your clubs, which tag each shot as you play.
- Talk to Shotto. Say what happened after a shot, a few words to your Apple Watch or iPhone, or talk through the whole round on the drive home. Shotto places each shot on the hole and works out your strokes gained off the tee, on approach, around the green and putting, with nothing to tap on the course and nothing on your clubs. Its strokes gained comes from these same tables. It also keeps what sensors can't see, like the target you had in mind and how the swing felt. Shotto Golf is on the App Store, with a two-week free trial.
Questions
What is a good strokes gained number?
Zero means a shot, round or part of your game matched the benchmark exactly. Against the PGA Tour baseline nearly every amateur is negative, so the useful comparison is against golfers at your level: a 15-handicap typically loses about 2 strokes a round putting to a scratch golfer, so losing 1 means your putting is ahead of your handicap. Both packages do that comparison (levelVsScratch / level_vs_scratch).
How many strokes does a 15-handicap lose to a scratch golfer?
About 14 a round: roughly 8 in the long game, 3 in the short game, half a stroke from bunkers and 2 putting. The table above has every level from 5 to 30.
Is strokes gained measured against the PGA Tour or a scratch golfer?
Either, or any handicap. The tables are the PGA Tour's, the standard reference. Measured against a scratch golfer, or a handicap like 10 or 15, the numbers say how a shot compares with golfers you'd actually play with, which is what the command line and the Claude and ChatGPT connector show by default.
Do I need sensors or a launch monitor to track strokes gained?
No. Strokes gained needs only where each shot started and finished. That can come from club sensors, from a notebook, or from what you say: Shotto works out strokes gained from shots you describe to your Apple Watch or iPhone.
Which golf apps calculate strokes gained?
Sensor-based trackers calculate it from shots their sensors tag, and some GPS apps from shots you tap in. Shotto calculates it from what you say about each shot, during the round or after it, so there's nothing to tap or attach. Shotto Golf is on the App Store for iPhone and Apple Watch.
What's in this repo
| Path | What it is |
|---|---|
data/baseline.json | The tables, with their sources |
data/conformance.json | 174 cases every implementation must pass to within 1e-6 |
js/ | The npm package: library, CLI and types |
python/ | The PyPI package: library, CLI and a pandas helper |
The two packages, and the Swift implementation in the Shotto app, are generated from the same baseline.json and pass the same cases, so they always agree. The command line tools print identical output.
This repository is a mirror of the packages in Shotto's main codebase, where the tables are shared with the app. Issues and pull requests are welcome here; we apply accepted changes there and they sync back.
Where the numbers come from
- Tee to green: Broadie (2011), "Assessing Golfer Performance on the PGA TOUR", Table 9: average strokes to hole out from about 8 million ShotLink shots, 2003 to 2010. Values between rows are interpolated in a straight line, and distances past either end take the end value.
- Putting: the Tour expected-putts curve by distance, anchored to the paper's 1.80 from 16 feet.
- Handicap levels: Broadie's Golfmetrics amateur data, by part of the game against scratch. The handicap given to each of his scoring groups (about 5, 17 and 30) is our estimate.
- The Tour's edge on scratch: about 5.4 strokes a round (Every Shot Counts, 2014). How it splits between the parts of the game is our estimate.
These are Tour averages from one era, the standard reference for strokes gained.
License
MIT. Made by Shotto.
No installation packages available.