Gauge arithmetic often produces a fractional count, while knitting requires whole stitches and a pattern may require a positive repeat multiple. There is no universally correct direction for rounding. KnitGauge therefore exposes the valid count below, the nearest valid count, and the valid count above, together with the dimension each choice actually produces.
Start with the unrounded count
For a project, raw stitches equal measured stitches multiplied by target width and divided by measured width. Rows use the same relationship with height. Keeping this value as an exact fraction prevents binary floating-point drift and provides a neutral reference before construction constraints are applied.
Find valid bounds from the repeat
With a stitch multiple of four, valid positive counts are 4, 8, 12, and so on. A raw result of 110 sits between 108 and 112. The lower option may be desirable when width must stay under a limit; the upper option may be preferable when coverage matters. The labels describe arithmetic, not a design recommendation.
Define nearest and ties explicitly
Nearest compares the exact distance to each bound. When both distances are equal, KnitGauge chooses the upper count so the result is deterministic and reproducible. The interface still shows both alternatives, so a user can choose based on fit, seams, edge stitches, or motif placement rather than treating nearest as automatically best.
Read the achieved dimension
Every rounded count maps back through the measured gauge. If 22 stitches occupy 10 cm, 112 stitches produce about 50.91 cm before other fabric effects. That achieved dimension makes the consequence of rounding visible. It remains a geometric estimate and does not include ease, seam allowance, border behavior, shrinkage, or shaping.