A numerically robust method for evaluating the temperature-dependent carrier concentrations and related Fermi levels is proposed. The method is applicable to simple cases for which analytical solutions are available as well as more complex cases in which numerical methods are required due to non-standard effects including bandgap widening, compensation and degeneracy induced by high levels of doping.