1/4″ per foot is generally accepted as the maximum slop on a drainage pipe. The reason is so that the waste is lifted and carried along the pipe, rather than having the affluent wash over the waste and not move it. So in your case, from point “A” to point “B” would be 5 inches. 20 feet times .25 inches equals 5 inches. If I’m not mistaken, at the point of connection if the 1/4″ per foot ends up being much higher than the main connection to the sewer or septic tank, I think they allow a 45 degree drop to make the connection. Good luck!