The Science of Yarn Substitution
Knitting or crocheting a pattern with a different yarn than the one used by the designer is a common necessity, but it requires more than just matching the 'weight' (e.g. Worsted or Fingering). You must ensure the total volume of fiber is sufficient to complete the garment.
The Yardage Myth
Fiber types vary wildly in density. 50 grams of Wool might contain 120 yards, while 50 grams of Cotton (which is much denser) might only contain 80 yards. Because patterns are written for specific geometric dimensions, you must substitute by Yardage, not by weight (grams).
The Formula
To find out how many skeins of the 'New' yarn you need, you divide the total yards required by the pattern by the yards per skein of your new yarn.
Skeins Needed = Ceil( Total Pattern Yards / New Skein Yards )
The 'Dye Lot' Buffer
Even if you calculate exactly 5.2 skeins, you should always buy 6 (or even 7). Yarn is dyed in batches called 'Dye Lots.' If you run out of yarn and have to buy another skein weeks later, the color might be slightly different, creating a visible line in your work. It is always better to have one leftover skein than a ruined project.