Actually, I think you can do it mathematically. Work a gauge swatch with the yarn and needles you want to use. Figure out your st per inch and multiply that by the number of inches in your pattern. So if you want your garment to be, say, 50 inches around, you would multiply your st per inch by 50 and that would tell you how many to cast on for 50 inches.
Now this works for sweaters that you knit in the round where there isn't any real shaping. I honestly don't know a good way to figure in your decreases/increases if you have a shaped garment. Hopefully, this will give you a place to start, though.