The level of phosphorus must be carefully monitored for proper and effective utilization of coal and coal ash. The phosphorus content needs to be assessed to optimize combustion efficiency and maintenance costs of power plants, ensure quality, and minimize the environmental impact of coal and coal ash. The detection of low levels of phosphorus in coal and coal ash is a significant challenge due to its complex chemical composition and low concentration levels. Effective monitoring requires accurate and sensitive equipment for the detection of phosphorus in coal and coal ash. X-ray fluorescence (XRF) is a commonly used analytical technique for the determination of phosphorus content in coal and coal ash samples but proves challenging due to their comparatively weak fluorescence intensity. Fourier Transform Infrared spectroscopy (FTIR) emerges as a promising alternative that is simple, rapid, and cost-effective. However, research in this area has been limited. Until now, only a limited number of research studies have outlined the estimation of major elements in coal, predominantly relying on FTIR spectroscopy. In this article, we explore the potential of FTIR spectroscopy combined with machine learning models (piecewise linear regression—PLR, partial least square regression—PLSR, random forest—RF, and support vector regression—SVR) for quantifying the phosphorus content in coal and coal ash. For model development, the methodology employs the mid-infrared absorption peak intensity levels of phosphorus-specific functional groups and anionic groups of phosphate minerals at various working concentration ranges of coal and coal ash. This paper proposes a multi-model estimation (using PLR, PLSR, and RF) approach based on FTIR spectral data to detect and rapidly estimate low levels of phosphorus in coal and its ash (R2\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$^2$$\\end{document} of 0.836, RMSE of 0.735 ppm, RMSE (%) of 34.801, MBE of − 0.077 ppm, MBE (%) of 5.499, and MAE of 0.528 ppm in coal samples and R2\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$^2$$\\end{document} of 0.803, RMSE of 0.676 ppm, RMSE (%) of 38.050, MBE of − 0.118 ppm, MBE (%) of 4.501, and MAE of 0.474 ppm in coal ash samples). Our findings suggest that FTIR combined with the multi-model approach combining PLR, PLSR, and RF regression models is a reliable tool for rapid and near-real-time measurement of phosphorus in coal and coal ash and can be suitably modified to model phosphorus content in other natural samples such as soil, shale, etc.