A Birdsmouth consist of two cuts, the horizontal seat cut and the vertical heel cut.
This calculator calculates the location of the plumb line for the heel cut on your rafter (lenght A to B), and the lenght of the matching seat cut.
According to the International Residential Code, the depth of the heel cut can be no more than one-quarter the width of the material you are using for rafters. If you are using a 2 x 12 for a rafter, then the maximum allowable depth of the heel cut will be 2 13/16 inches. A 2 x 4 rafter's heel cut can be no more than 7/8 of an inch deep.