Once this calculation is considered, you can figure out how many gallons of deck stain you need by reading the coverage rate of the stain you are buying. On average most deck stains cover 150-300 sq. ft. per gallon depending on the age, condition, and porosity of the wood.
How do you calculate square footage of a fence?
Take the fence height X the length X two (sides) and you will have an apx of the square feet. Example 4ft high X 100 feet long X 2 sides = 800 square feet. 800/250= 3.2 gals. Realistically, if you are careful and try to hit the pickets and not waste as much on the spaces, you may use a slight bit less.