  We propose an upper bound on the Atiyah-Singer index in the effective action
of string theory. For $E_8 \times E_8^\prime$ and $SO(32)$ heterotic string
theories on smooth Calabi-Yau threefolds with line bundles, we find that the
tadpole cancellation and supersymmetry conditions lead to an upper bound on the
generation number of quarks and leptons as well as Higgs doublets. By taking
into account the observed value of four-dimensional gauge couplings and the
supergravity approximation, we explicitly evaluate the bound on favorable
complete intersection Calabi-Yau threefolds. The bound can be extended to
Calabi-Yau threefolds in the Kreuzer-Skarke database. We also put the upper
bound on the Atiyah-Singer index in Type IIB/F-theory compactifications.
