For semiconductors with localized intrinsic/impurity defects, intentionally doped or unintentionally incorporated, that have multiple transition energy levels among charge states, the general formulation of the local charge neutrality condition is given for the determination of the Fermi level and the majority carrier density. A graphical method is used to illustrate the solution of the problem. Relations among the transition energy levels of the multi-level defect are derived using the graphical method. Numerical examples are given for p-doping of the CdTe thin film used in solar panels and semi-insulating Si to illustrate the relevance and importance of the issues discussed in this work.