You do not calculate it, you compare an existing gear with a printed sample or a gear pitch gage of the same pressure angle and diametral pitch, then the number of the cutter is determined by the number of teeth on the gear to be cut. I am speaking here of diametral pitch gears, which are made in 14 - 1/2 degree and 20 degree pressure angle, but there are also module system gears which are common on European and Asian machinery, which unless quite old are liable to be 20 degree PA, also noted, for them, the cutter numbering system is backwards from the DP system, but tool catalogs will detail which cutter is in which number of teeth range.