There are many reasons you might want to adjust a published knitting pattern to better suit your needs. Maybe your gauge is a little off, or you're using a different kind of yarn, so you'll need to cast on more or fewer stitches.
It's great to use a published pattern as a jumping off point for a project if you're not comfortable designing your own or you just need to make a couple of basic alterations.
You may be one of those knitters who never knits gauge swatches or "always knits to gauge," but if you're going to be altering a pattern, you have to know your specific gauge for the yarn, needles and pattern stitch you're going to be using. Otherwise, you'll have no basis for making your alterations.
It may only be by making a gauge swatch that you realize you need to make alterations to the pattern. It's virtually all Stockinette stitch knit flat. The only problem was I didn't have enough bulky yarn to make it.
In the case of a simple Stockinette project, all you have to do to determine how many stitches you need to cast on instead of the number recommended is to determine the measurement of the piece you need and the gauge you're getting.
First, divide your 4-inch gauge by 4 so you know how many stitches per inch you're getting, then multiply by your finished piece measurement to determine how many stitches to cast on.
If you're working a pattern that involves a stitch pattern with a multiple, make sure your adjusted numbers will work with the pattern.
Remember that the cast on isn't the only number you'll have to adjust when altering a knitting pattern. Anywhere there's a decrease, bind off or any other instruction that involves a number of stitches, you'll have to rethink the pattern to make sure you're doing it right for your number of stitches.
Consider how many stitches are bound off for armholes and if that's too many or too few for your gauge.
Go Your Own Way and Track Your Results
While you're altering the pattern, remember that you don't have to stick to doing things exactly the way the pattern suggests. Whenever you alter a pattern, you should take notes on exactly what you did and how it turned out. That way if you make a mistake you can go back to your notes and figure out what went wrong. You'll also have the right numbers if you want to knit the same project again, and you'll know what went right if you want to alter a similar pattern in the future.