How I can calculate how much fabric I need to buy?
There are rule of thumb estimates for standard items of clothing.
If you go to a good fabrics shop the experienced staff may still know them. I do not expect to find them in the instructions for buying online.
They were rough estimates at best and mostly you would buy more than you would need.
The best way to work out what you need will be making the pattern pieces and placing them on a table as wide as your fabric. But remember that many pattern only give half the pieces and you use the fabric folded.