The back of your pattern will tell you how much fabric you will need (yardage) to buy based on your measurements and which version of the pattern you decide to make.
Make sure that you’re aware of the units of these measurements (usually inches, but some European patterns will be in metric). Also be aware of the width of the fabric that these measurements refer to. Bolts of fabric are usually 45” or 60” from selvage (finished edge) to selvage and the amount of fabric you need will depend on this. Buy a little extra fabric so that you have some leeway if you make a mistake or the fabric shrinks when you wash it. You can always save any leftovers for other projects.