When installing a duct that is 24″ x 8″ in an area that is too small, how much of the joist can be cut away to make room?

When installing a duct that is 24″ x 8″ in an area that is too small, how much of the joist can be cut away to make room?