The total energies of 4H-SiC with donor-acceptor-donor (D2A) trimer codopants (D = N, P, As, and Sb, A = B, Al, Ga, and In), the formation energies of D2A, DA, D, and A species and the binding energies were studied usingab initiocalculations in order to determine the stable structures of D2A trimer codopants in 4H-SiC. The results of the calculations indicated that some of the trimer codopants were formed and were stable in 4H-SiC. In particular, N2Al, N2Ga and N2In trimer codopants with N(Ch)-Al/Ga/In (Sik)-N(Ch) configuration and As2B trimer codopants with As (Sih)-B(Ck)-As (Sih) configuration stably exist in 4H-SiC under the doping condition wherein the concentration ratio of donors to acceptors is 2 : 1.