Depends on your system/setup.
I use BeerSmith to get my pre-boil volume. I mash at the ratio I want (usually in the 1.25-1.35 qt/# ratio range) then sparge with enough to get to the pre-boil volume (also provided by BeerSmith). To get the target amount going into primary/fermenter, you'll also need to know your boi-off rate, and other losses. I typically want 6 gallons going into keg (filling two 3 gallon kegs) which means I get 6.75-7 gallons into primary. With all the other losses, amount left in keggle, in hoses, plate chiller, etc., I usually end 1-2 quarts above that.