In g-C3N4, three nitrogen atoms can be removed to create vacancies: N1, nitrogen being bonded to three carbon atoms connecting three heptazine flakes; N2, nitrogen being bonded to only two C atoms; and N3, nitrogen being removed from inside a heptazine sub-structure. To determine the most stable state, we considered the neutral state of the vacancy and examined the various possible spin states. Our analysis reveals that the N3 vacancy in a doublet spin state is the most stable, as shown in Table .