A fabric yardage calculator that turns a list of pattern pieces into a precise yards-to-buy figure — rounded up to the nearest ⅛ yard (or 0.1 metre) and backed by a visual strip layout. Useful for dressmaking, quilting, home dec, and any project where you need to translate a cut list into a shop order before you reach the cutting table.
How it works
The calculator uses a strip-packing approach that mirrors how a real cutter lays fabric on a table:
- All pieces are sorted by cut height — tallest first — so the most demanding strip heights are handled before the fabric runs out.
- Each piece is placed as far left as possible in the current horizontal strip (row across the bolt). When a piece does not fit in the remaining width, a new strip opens directly below.
- The total required length equals the sum of all strip heights, plus a small seam-allowance gap between each strip, plus a percentage buffer for print repeats, notch clearance, or accidental mis-cuts.
This is a well-known First-Fit Decreasing Height (FFDH) bin-packing approximation. For rectangular pieces without nap or directional grain it typically comes within 5–10% of a hand-optimised layout — accurate enough for buying fabric and far better than guessing.
The rounding rule
Fabric is sold in ⅛-yard increments (4.5 inches) at the cutting table. The calculator takes the raw length in inches, adds the buffer, then applies:
Yards to buy = ⌈ (raw inches × (1 + buffer)) ÷ 36 × 8 ⌉ ÷ 8
The ceiling is taken on the nearest ⅛ yard so you always have a little in hand. In metric mode the result is rounded up to the nearest 0.1 m.
Worked example
Suppose you are sewing a simple A-line dress on 45″-wide cotton. Your pattern gives four cut pieces:
| Piece | Width | Length | Qty |
|---|---|---|---|
| Front bodice | 18″ | 24″ | 2 |
| Back bodice | 16″ | 22″ | 2 |
| Sleeve | 14″ | 20″ | 2 |
| Waistband | 40″ | 4″ | 1 |
With ⅝″ seam allowance gaps and a 5% buffer on 45″ fabric the calculator produces 2⅛ yards (approximately 1.97 m). A typical fabric store estimate “just get 2.5 yards” would be fine but wasteful; knowing you only need 2⅛ yards saves money — especially on expensive suiting or silk.
Quick reference: common bolt widths
| Width | Typical use |
|---|---|
| 36″ | Voile, some interfacings, woven ribbons |
| 44/45″ | Quilting cotton, shirting, broadcloth |
| 54″ | Home-dec wovens, canvas, some wool |
| 58/60″ | Apparel knits, ponte, denim, bottom-weight wovens |
| 72″ | Fleece, polar fleece |
| 108″ | Wide quilt backing |
Tips for accurate results
- Enter cut dimensions, not finished (sewn) dimensions.
- Remove selvedges before measuring — usable width is usually 1–2″ less than the stated bolt width.
- For nap or one-way prints, increase the buffer to 10–15%; for very large repeats (12″ or more) add one full repeat length per colourway manually.
- Pre-wash shrinkage on natural fibres typically takes 2–5% of length. Adding 5% buffer covers this for most projects.
- When ordering online, round up to the nearest ¼ yard to allow for cutting inaccuracies at the warehouse.