Crochet and knit patterns list a specific yarn and the number of balls of yarn needed. Using the specified yarn is the best way to achieve the intended results. If you would like slightly different results (e.g., different fiber content due to a sensitivity) or the specified yarn is not available, you may wish to substitute a different yarn. There are at least three things to consider when selecting a substitute yarn: 1) Weight, 2) Quantity, and 3) Drape. Yarns can be grouped into different weight categories, as described on the Craft Yarn Council web-site.
For best results, when a substitution must be made, select a yarn of the same weight and with similar fiber content. Yarn comes in balls of different weights and lengths. When determining how many balls of a substitute yarn will be needed, compare the total yardage. For example, if there are 120 yards in each ball of the specified yarn and 4 balls are needed, 4 x 120 yards = 480 total yards are needed.
If you wish to substitute a yarn that comes in balls of 110 yards each, you will need 480 / 110 = 4.63 balls, or 5 balls, of the substitute yarn. Different yarns look and behave a bit differently when knit or crocheted even when the exact same pattern stitch is used. A substitute yarn may yield firmer or looser fabric than the specified yarn. Make a swatch in the project pattern stitch, study the drape of the resulting fabric, and decide if the drape is acceptable.