A.Corresponding editor Paul Fisette responds: The rule that most codes use is that holes can’t be any closer than 2 inches from the top or bottom of the joist, and cannot be within 2 inches of any other hole. If the joist is notched, you can’t drill the hole within 2 inches of the notch. The hole’s diameter can’t exceed one-third of the joist depth. So in your case, the largest hole would be 2 3/8 inches.
Notches in the top or bottom of a joist can’t exceed one-sixth the depth of the joist and can’t be longer than one-third the joist depth. Notches must not be made in the middle third of the span. If a notch is made at the very end of the joist, it can’t exceed one-quarter the joist depth.
to read the full article.