How to knit an accurate gauge swatch
Swatch big, block it, and measure over four inches so your cast-on math is right the first time. A practical guide for knitters.
Why the swatch is worth the time
It is tempting to skip the swatch and cast on straight from a pattern, but gauge is the single number that controls finished size. A difference of half a stitch per inch does not look like much on a small square, yet across the front of a sweater it can add or subtract several inches. Knitting a swatch first lets you catch that error while it costs a few minutes rather than after you have finished a whole garment that does not fit.
Make the swatch large and honest
Cast on enough stitches for a square that is at least six inches wide, then knit it tall enough to measure four inches of height away from the edges. Edge stitches distort, so you want a calm patch in the middle to count. Knit in the same stitch pattern you will use in the project, because stockinette, ribbing and cables all pull to different gauges. Use the exact yarn and needles you plan to knit with, since even the same weight from another brand can behave differently.
Block before you measure
Yarn changes once it is washed and dried, sometimes dramatically. Wet blocking relaxes the stitches and lets the fabric settle into the gauge it will actually hold in the finished piece. Measure a swatch straight off the needles and you may record a gauge the garment never keeps. Block the swatch the same way you intend to care for the project, let it dry fully, then lay it flat and unstretched to count.
Count over four inches and enter the numbers
Lay a ruler across the middle of the blocked swatch and count the stitches spanning four inches, including partial stitches at the ends as best you can. Do the same vertically for rows. Feeding the four-inch counts into the calculator, rather than a single inch, averages out small tension wobbles and gives a truer stitches-per-inch figure. From there the tool multiplies your gauge by the target width and height to hand you the cast-on stitches and total rows.