Enter your blocked swatch gauge and pattern repeat to find valid cast-on counts and widths around your desired panel width.
Advanced options
Table of contents
How to use our Knitting Cast-On and Pattern Repeat Width Calculator
- Enter the finished flat width you want in "Desired panel width."
- Count whole stitches across the center of a washed and blocked swatch, then enter that count in "Stitches measured on swatch."
- Measure that exact counted span in inches and enter it in "Measured swatch width."
- Enter the stitch multiple from the pattern in "Stitches per pattern repeat."
- If the pattern says a multiple plus extra stitches, open "Advanced options" and enter the total one-time addition in "Extra stitches across both edges." For a multiple of 8 plus 2, enter 8 and 2.
- Select "Calculate." Compare the lower count, which does not exceed your target width, with the upper count, which reaches or exceeds it.
- If both choices match, your target is an exact repeat fit. If the lower choice says "No smaller repeat," one complete repeat plus the extra stitches is already wider than your target.

Definitions
Gauge: The number of stitches per inch, found by dividing the counted stitches by the width of that same swatch span.
Pattern repeat: A group of stitches that repeats across the row. A pattern may state this as a multiple, such as a multiple of 8.
Extra stitches: Stitches added once across the full row for edges, balancing, or a pattern rule such as "multiple of 8 plus 2."
Exact repeat fit: A target width whose calculated stitch count already follows the repeat rule, so the lower and upper cast-on choices are the same.
Common mistakes and quick fixes
Mistake: Counting stitches across one part of the swatch but measuring a different width.
Fix: Count and measure the same center span of the washed and blocked swatch.
Mistake: Adding the pattern's extra stitches to every repeat.
Fix: Enter the stitch multiple in "Stitches per pattern repeat" and enter the one-time total in "Extra stitches across both edges."
Mistake: Entering extra stitches for one edge when the pattern gives a combined total.
Fix: "Extra stitches across both edges" is the total added once across the whole cast-on row.
Mistake: Casting on a nearby count that is not a valid pattern multiple.
Fix: Use one of the displayed cast-on counts. Counts between them may not work with the stitch pattern.
Limitations & Key Assumptions / Boundary Conditions
- The calculation applies to a flat, constant-width panel at the gauge measured from your washed and blocked swatch.
- It predicts width from stitch gauge only. It does not plan shaping, sleeve caps, necklines, seams, ease, or full garment resizing.
- Gauge can change with yarn, needle size, stitch pattern, blocking, and how the fabric is worn. Make a project swatch when fit matters.
- The pattern rule must be entered correctly. Confirm whether its added stitches are a total across the row, per edge, or part of another instruction.
- At least one complete pattern repeat is required for a valid cast-on choice in this calculator.
Methodology
Calculation
The calculator first finds stitch gauge from the same blocked swatch span used for both entries.
gauge = stitches / swatch_w
It then converts the desired panel width into an unrounded target stitch count.
target_stitches = target_w * gauge
Allowed cast-on counts have the pattern form of extra stitches plus one or more full repeats. The extra stitches are added once, not once per repeat.
allowed_count = edge_n + repeats * repeat_n, where repeats >= 1
The lower answer uses the largest allowed count at or below the target. The upper answer uses the smallest allowed count at or above the target. For an exact boundary, both calculations use the same count. If the lower calculation has fewer than one repeat, the lower result is shown as "No smaller repeat."
repeat_position = (target_stitches - edge_n) / repeat_n
lower_repeats = floor(repeat_position)
upper_repeats = max(1, ceil(repeat_position))
Worked example
Suppose 20 stitches measure 4 inches, so the gauge is 5 stitches per inch. For a 10.2-inch target, the unconstrained target is 51 stitches. With a multiple of 8 plus 2 extra stitches, 51 is not allowed: the adjacent valid counts are 50 and 58. Their expected widths are 10 inches and 11.6 inches.