were do you get your quantities are there formulas for this
I'm mathematically challenged, so I use software. But I set up the software, so I do have an understanding of how to do it even if I don't like to do the actual math!
Like was said, your mash volume is usually 1.25- 1.5 quarts of water per pound of grain. To keep it simple, let's say you have 10 pounds of grain. So, you'd use 15 quarts of water (going with the 1.5 quarts/pound), which is 3.75 gallons.
The grain usually aborbs about .1 gallon per pound, so you could expect to get out 2.75 gallons out of those first runnings, possibly a bit less if you have a lot of dead space in your mashtun.
If it's a 5 gallon batch, your boil volume might be 6.5 gallons. So, if you get out 2.50 gallons from the first runnings, you'll need 4.00 gallons of sparge water to get to your boil volume. I'd split those into two additions, and use 2 gallons in each. That should get you very close to 6.5 gallons of wort.
I picked 10 pounds of grain, to keep the math simple, but it works for all amounts of grain.