Draw a mark on the bathroom ceiling where you'd like to install the vent fan. For optimum performance, locate it between the shower and the toilet.
Use an extra-long, 3/8-inch-diameter spade bit to bore a reference hole through the ceiling and into the attic. Climb into the attic and clear away any insulation from around the hole. Now use the reference hole to determine the exact position of the fan.
Measure the vent fan housing. Try to position the vent fan directly between two joists near your reference hole. Take into account any nearby pipes or other obstructions. Note the final position of the vent fan in relation to the reference hole.