In this paper, the performance of a N+- CdTe/ n- Hg0.824675Cd0.175325Te/ p+- Hg0.824675Cd0.175325Te n–i–p photodetector with a heavily doped CdTe material as a window for terahertz frequency application has been analyzed. The detector is designed and studied in respect of electrical and optical characteristics. The results obtained with the help of TCAD tool are compared with the results obtained on the basis of the analytical model. The proposed photodetector is suitable for operation at a wavelength of 30 μm at liquid nitrogen temperature (77 K). It has the characteristics of dark current of 4.6×10-9A, quantum efficiency (η) ~ 73.93%, responsivity (R) ~ 17.9 A/W, specific detectivity (D∗) ~ 1.44×109mHz1/2W-1, noise equivalent power (NEP) ~ 0.3×10-16W. © 2020, Springer Science+Business Media, LLC, part of Springer Nature.