To achieve n-type doping in diamond, extensive investigations employing first principles have been conducted on various models of phosphorus doping and boron-phosphorus co-doping. The primary focus of this study is to comprehensively analyze the formation energy, band structure, density of states, and ionization energy of these structures. It is observed that within a diamond structure solely composed of phosphorus atoms, the formation energy of an individual carbon atom is excessively high. However, the substitution of two carbon atoms leads to the conversion of diamond into a p-type semiconductor. Upon examining the P-B co-doping structure, it is revealed that the doped impurities exhibit a tendency to form more stable cluster configurations. As the separation between the freely doped atoms and the cluster impurity structure increases, the overall stability of the structure diminishes, consequently resulting in an elevation of the ionization energy. Analysis of the electronic density of states demonstrates that the electron orbit of the B atom makes negligible contributions to the impurity levels during P-B doping.