Let P be a monic irreducible polynomial. In this paper we generalize the determinant formula for h(K-Pn(+)) of Bae and Kang and the formula for h(-) (K-Pn) of Jung and Ahn to any subfields K of the cyclotomic function field K-Pn: By using these formulas, we calculate the class numbers h(-) (K), h(K+) of all subfields K of K-P when q and deg(P) are small.