Thermoelectric (TE) materials that convert heat directly into electricity are crucial for waste heat recovery and renewable energy applications. This study focuses on Mg3X2 ([Formula: see text], As, and Sb) compounds, which have emerged as promising candidates for TE applications due to their abundance, non-toxicity, and potential for high efficiency across a broad temperature range. We employed density functional theory and the VASP simulation code to compute the structural, electronic, and TE properties of Mg3X2 compounds. Structural analysis indicates that Mg3P2 and Mg3As2 crystalize in cubic form and Mg3Sb2 acquire a trigonal structure. Mg3P2 and Mg3As2 have direct bandgaps of 1.60 and 1.42[Formula: see text]eV, while Mg3Sb2 has an indirect bandgap of 0.24[Formula: see text]eV. Mg3P2 and Mg3As2, with their lower thermal conductivities, show high figures of merit (ZT), particularly at low temperatures. Mg3Sb2, though exhibiting a higher thermal conductivity, demonstrates superior power factors at elevated temperatures. The mechanical stability and phonon dispersion curves analysis confirms that all compounds meet the criteria for structural stability, suggesting their suitability for practical applications. This work highlights the potential of Mg3X2 compounds as viable TE materials and provides insights for future experimental and theoretical studies aimed at improving their performance.