ForHosting KIT · Developer Utilities

Knitting stitches for width calculator

This knitting stitches for width calculator turns a real swatch measurement into a practical cast-on count.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Enter how many stitches you counted, the width covered by that count, and the width you want the finished piece to reach. The calculator derives stitches per unit, scales that gauge to the target width, and rounds the answer to a usable whole stitch. Inches, centimetres, and other units all work as long as the swatch width and target width use the same unit.

Measure a useful section of your swatch

Knit and finish your swatch the way you will treat the finished project before taking measurements. Washing, blocking, drying, and even resting can change the fabric enough to alter the stitch count needed across a garment or accessory. Place the swatch on a flat surface without stretching it. Count the stitches across a clear central span, avoiding cast-on edges and side stitches because they can distort the apparent gauge. A wider measured span generally gives a more representative result than counting only one inch or one centimetre. Enter that count as swatch_stitches and the corresponding physical span as swatch_width. The count does not have to cover the entire swatch, but both values must describe exactly the same section. If you count 22 stitches across four inches, for example, do not enter the full six-inch swatch width. Accurate paired measurements are more important than using a particular unit or producing a perfectly round gauge number.

Understand the calculation and rounding choice

The calculator first divides swatch_stitches by swatch_width to find the number of stitches per unit. It then multiplies that density by target_width. The mathematical result may be fractional even though a needle can only hold whole stitches, so the selected rounding method determines the recommendation. Nearest chooses the closest whole stitch, up always chooses the next whole stitch when there is a fraction, and down always chooses the lower whole stitch. The output includes exact_stitches before rounding and recommended_stitches after rounding, making the decision visible. It also reports implied_width, which is the width that the recommended whole count represents at the measured gauge. That small difference from the target is normal and lets you compare the practical effect of different rounding choices. The formula assumes the fabric continues behaving like the measured swatch; it does not add selvage stitches, seam allowances, button bands, or pattern-repeat adjustments automatically.

Apply the count to a knitting pattern

Treat recommended_stitches as the plain width-based count, then consider how the project is constructed. A stitch pattern may require a multiple, such as six stitches, plus extra edge stitches. Seamed pieces may need selvage stitches, while a cardigan band can be worked separately or included in the total. Negative ease for a hat or fitted garment and positive ease for an oversized garment should normally be reflected in target_width before calculation. If the pattern gives a finished circumference, decide whether you are calculating the full round or one flat piece and enter the matching width. When the recommendation sits between valid pattern multiples, compare the closest lower and higher options rather than silently changing the gauge. The reported stitches_per_unit and implied_width help with that check. Finally, make a short verification section at the chosen count when fit is critical. Swatches predict fabric, but fibre, needle material, knitting position, and the weight of a large piece can still change the final dimensions.

Size a scarf or blanket

Convert your washed swatch gauge into a starting stitch count for a specific finished width.

Adapt a garment panel

Estimate the plain stitch count for a front, back, or sleeve section before adding pattern and edge requirements.

Compare rounding options

See the implied finished width after rounding up, down, or to the nearest whole stitch.

What does the calculator cost?

The API price is $0.002 per request, and the browser calculator can run locally.

Can I use centimetres instead of inches?

Yes. Use any length unit, provided swatch_width and target_width use the same one.

Should I measure the swatch before or after blocking?

Measure after washing and blocking it as you expect to treat the finished item.

Does the result include edge or selvage stitches?

No. The result is the width-based count. Add construction-specific edge stitches afterward.

How should I handle a stitch-pattern repeat?

Adjust the recommendation to a valid repeat multiple, then use implied width or the gauge to assess the size change.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/hobby/craft-knit-stitches-for-width

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/hobby/craft-knit-stitches-for-width \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"swatch_stitches":22,"swatch_width":4,"target_width":18}'
{
  "swatch_stitches": 22,
  "swatch_width": 4,
  "target_width": 18
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "hobby.craft_knit_stitches_for_width",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →