Knitting gauge calculator
Cast on 100 stitches. At your gauge they measure 20.00 in across. Work 130 rows for a length of 20.00 in.
Result
Stitches to cast on
Width of that count
in
Stitches before fitting the multiple
Rows to work
Length of those rows
in
Stitches per inch
Rows per inch
Stitches per ten centimeters
Rows per ten centimeters
How it works
Count the stitches across a measured width of your swatch and the rows over a measured length. The tool divides one by the other to get stitches per inch from a swatch of any size, multiplies by the width you want, and that is how many stitches to cast on. A cast on calculator that stops there gives counts that do not fit a rib or a lace repeat, so you can enter the stitch multiple and the extra stitches, and the count moves to one that fits. The width shown is the width of that final count. How many rows to knit for a length is the same sum with the row gauge.
Formula
stitches per inch = swatch stitches ÷ swatch width. Stitches for the width = width × stitches per inch, then moved to a count that fits the stitch multiple (repeat × whole number + extra stitches). Real width = cast-on stitches ÷ stitches per inch. Rows = length × rows per inch, to the nearest whole row.
Worked example
The calculator opens with this example; the result above is computed from it.
| Input | Value |
|---|---|
| Swatch: stitches counted | 20 |
| Swatch: counted over a width of | 4 in |
| Swatch: rows counted | 26 |
| Swatch: counted over a length of | 4 in |
| Width you want | 20 in |
| Length you want | 20 in |
| Stitch multiple | 1 |
| Plus extra stitches | 0 |
| Fit the multiple by going | To the nearest count |
| Stitches to cast on | 100 |
| Width of that count | 20.00 in |
| Stitches before fitting the multiple | 100.0 |
| Rows to work | 130 |
| Length of those rows | 20.00 in |
| Stitches per inch | 5.00 |
| Rows per inch | 6.50 |
| Stitches per ten centimeters | 19.7 |
| Rows per ten centimeters | 25.6 |
Common cases
| Case | Starting values | Stitches to cast on | Width of that count | Stitches before fitting the multiple | Rows to work | Length of those rows | Stitches per inch | Rows per inch | Stitches per ten centimeters | Rows per ten centimeters |
|---|---|---|---|---|---|---|---|---|---|---|
| Scarf in worsted weight yarn | Swatch: stitches counted 18; Swatch: counted over a width of 4 in; Swatch: rows counted 24; Swatch: counted over a length of 4 in; Width you want 8 in; Length you want 60 in; Stitch multiple 1; Plus extra stitches 0 | 36 | 8.00 in | 36.0 | 360 | 60.00 in | 4.50 | 6.00 | 17.7 | 23.6 |
| Hat brim in two by two rib | Swatch: stitches counted 22; Swatch: counted over a width of 4 in; Swatch: rows counted 30; Swatch: counted over a length of 4 in; Width you want 20 in; Length you want 8 in; Stitch multiple 4; Plus extra stitches 0 | 108 | 19.64 in | 110.0 | 60 | 8.00 in | 5.50 | 7.50 | 21.7 | 29.5 |
| Baby blanket with a twelve stitch repeat | Swatch: stitches counted 16; Swatch: counted over a width of 4 in; Swatch: rows counted 22; Swatch: counted over a length of 4 in; Width you want 30 in; Length you want 36 in; Stitch multiple 12; Plus extra stitches 2 | 122 | 30.50 in | 120.0 | 198 | 36.00 in | 4.00 | 5.50 | 15.7 | 21.7 |
| Cowl with a charted repeat | Swatch: stitches counted 24; Swatch: counted over a width of 4 in; Swatch: rows counted 24; Swatch: counted over a length of 4 in; Width you want 21 in; Length you want 12 in; Stitch multiple 24; Plus extra stitches 0 | 120 | 20.00 in | 126.0 | 72 | 12.00 in | 6.00 | 6.00 | 23.6 | 23.6 |
Questions and answers
How many stitches do I cast on for a scarf?
At 18 stitches over 4 in, a scarf 8 in wide needs 36 stitches. For a length of 60 in at 24 rows over 4 in, work 360 rows.
How many stitches do I cast on for a hat?
At 22 stitches over 4 in, a hat that measures 20 in around needs 110.0 stitches. The nearest count that fits a two by two rib is 108, which measures 19.64 in.
Assumptions and limits
- Measure the swatch after washing and drying it the way you will treat the finished piece.
- Count over as wide a stretch as the swatch allows, away from the edges. Four inches is a little more than ten centimeters, so a gauge per four inches is not quite the gauge per ten centimeters.
- When the count sits exactly halfway between two that fit, the nearest setting takes the lower one.
- Row gauge changes more with blocking and wear than stitch gauge. For lengths, measuring the work as you go is safer than counting rows.
The result is an estimate for planning, not professional advice.
Sources
- We Are Knitters: how to adapt patterns to different yarns (width times gauge stitches divided by the swatch width; rows the same way)retrieved 2026-10-13
- Pacific Knit Co, Jamie Lomax: Doodle math, changing yarn weight and gauge (stitches per inch, cast-on, rows, rounding to a chart repeat)retrieved 2026-10-13
- Elizabeth Smith Knits: How big should my swatch be? (per inch gauge and stitches for a width)retrieved 2026-10-13
Last updated:
Method in depth: Gauge, stitch counts and finished size
Cite this page: Knit Math, “Knitting gauge calculator”, https://knit-math.pages.dev/gauge-and-yarn/knitting-gauge-calculator/ (updated 13 October 2026).
Found a mistake? Email handycalc.sites+knitmath@gmail.com.