Knitting Tools

Hat Calculator

Enter head circumference, gauge and fit, and get the number of stitches to cast on — already rounded to your ribbing repeat.

Tape measure and a knitted swatch
Hat stitch counts worked out from your own measurements.

How to use the calculator

  1. 1
    Head measurement

    Pick a ready-made size, or measure the head where the hat will sit.

  2. 2
    Gauge and fit

    Enter sts per 4 in (10 cm) and choose slouchy, standard or snug.

  3. 3
    Cast on

    Get the stitch count rounded to your ribbing repeat.

Hat Calculator – Calculate stitches

Use our free interactive hat knitting calculator. Enter your head circumference and gauge to easily calculate exactly how many stitches you need to cast on.

Units:

A Norwegian version of this page is available on Strikketips.no

Why hats rarely fit without the math

A hat has no seams, no buttons and nowhere to hide. Either it comes down over the ears and stays there, or it does not. That is why a hat is the garment where being five stitches out shows up immediately, while the same five stitches disappear in a scarf.

The arithmetic itself is simple: stitches = (head circumference − negative ease) × gauge ÷ 4 in. What goes wrong is the two terms people guess at — how much smaller than the head the hat should be, and how the stitch count has to be adjusted so the ribbing works out. The calculator above handles both, and the rest of this page explains what it is doing, so you can overrule it when your yarn behaves differently.

Negative ease: how much smaller than the head?

Knitting stretches. A hat measuring exactly the same as the head sits without tension and rides up within a block. So hats are knit with negative ease — deliberately smaller than the head, with the stretch holding them in place.

How much depends on the hat you want. The calculator uses these fractions of the head circumference:

  • Slouchy: about 3.5% — the hat falls back, no grip.
  • Standard: about 8% — stays put without being noticeable.
  • Snug: about 11.5% — sits close, good under wind or a helmet.

On a 22½ in (57 cm) adult head that works out to roughly ¾ in, 1¾ in and 2½ in (2, 4.5 and 6.5 cm). Note that these are fractions, not fixed inches: a 16 in (41 cm) baby head cannot absorb the same 2½ in an adult head can, and a fixed number would give a baby hat that is disproportionately tight.

All-over ribbing pulls in further

If the whole hat is ribbed rather than just the brim, it draws in considerably more than stockinette. Choose the slouchy fit even if you want a hat that sits close — the ribbing supplies the grip on its own.

Why the stitch count has to match the ribbing

Ribbing is a repeat worked around the whole round. K1/P1 needs a stitch count divisible by 2; K2/P2 needs one divisible by 4. If it does not divide evenly you run into yourself at the start of the round, with two knits or two purls in a row where the pattern should have alternated.

So the calculator works out the raw stitch count first, then rounds to the nearest number divisible by the repeat you enter. The adjustment is rarely more than a couple of stitches, and a couple of stitches on a hat is under a quarter inch.

If you have a stitch pattern above the ribbing — cables, colorwork or similar — enter the repeat of the pattern rather than the ribbing when it is the larger of the two. The larger repeat is always the one that has to divide evenly.

Use your stockinette gauge, not the ribbing

The most common mistake in hat math is measuring gauge over the ribbing. Ribbing is always tighter than stockinette — often by several stitches per 4 in — and using that number gives a stitch count that is far too high, and a hat that blows out once the body begins.

Measure a washed and blocked stockinette swatch, worked in the round if the hat is worked in the round. The gauge calculator handles the measuring and conversion, and the gauge guide explains why the swatch has to be blocked before you measure it.

How long should the hat be?

The stitch count gives you the circumference; the height is yours to decide. The rule of thumb for a standard adult hat is 8–8½ in (20–22 cm) from cast-on to the top of the decreases, with the last 2–2¾ in (5–7 cm) being the crown shaping itself. If the brim is meant to fold up, add the fold on top — a 2 in double fold means 4 in of extra knitting.

The crown is usually decreased over 6–8 rounds, spread evenly around. The increase and decrease assistant distributes those decreases when the stitch count does not divide neatly by the number of decrease points.

A worked example

Adult M, 22½ in (57 cm) head, standard fit, 20 sts per 4 in (10 cm), K2/P2 ribbing:

  1. Negative ease: 22.5 × 0.08 = 1.8 in, rounded to 1¾ in (4.5 cm).
  2. Hat circumference: 22.5 − 1.75 = 20¾ in (52.5 cm).
  3. Stitch count: 20.75 × 20 ÷ 4 ≈ 104 stitches.
  4. Already divisible by 4, so the cast-on is 104 stitches.

That is exactly what the calculator does — the difference is that it also handles centimeters, half stitches and sizes you type in yourself.

The head sizes in the calculator

The size list covers preemie and baby, toddler, child, and adult S/M/L. The values come from the Craft Yarn Council head circumference chart, which gives a range per age group; the calculator uses one representative value within each range.

If the head is available, measure it. A chart is an average, and heads vary more than charts do. Choose the custom option and enter your own number.

Source: Craft Yarn Council, Head Circumference Chart.

How many stitches do I cast on for a hat?

Take the head circumference, subtract the negative ease, and multiply by your gauge. An adult head of 22½ in (57 cm) with a standard fit (about 1¾ in / 4.5 cm of negative ease) at 20 sts per 4 in (10 cm) gives roughly 104 stitches once the number is rounded to fit the ribbing repeat.

What is negative ease, and why does a hat need it?

Negative ease means the hat is knit smaller than the head. Knitting stretches, and a hat measured to the exact head circumference slides off. The calculator uses about 3.5% for a slouchy fit, 8% for standard and 11.5% for snug.

Does the stitch count have to match the ribbing repeat?

Yes. K1/P1 ribbing needs a multiple of 2, and K2/P2 needs a multiple of 4. Cast on 105 stitches for K2/P2 ribbing and you meet a half repeat at the start of the round. The calculator rounds to the nearest count that divides evenly by the repeat you choose.

Which gauge should I enter?

Your stockinette gauge, measured on a washed and blocked swatch — not the gauge of the ribbing. Ribbing always pulls in tighter than stockinette, and measuring there gives a hat that is too big.

Does it work for baby and child hats?

Yes. The size list covers preemie, baby, toddler, child and adult S/M/L, using head circumferences from the Craft Yarn Council chart. You can also type in a measurement of your own.