The mechanical properties of a material directly influenced by its microstructural phases and chemical composition. This study aimed to identify and quantify the retained austenite in AISI 4140 steel, a microstructural phase that can impact component durability and dimensional stability. A special etchant with sodium metabisulfite was used successfully to reveal retained austenite in microscopic images, as revealing it using typical etchants almost impossible. Image processing techniques, including the KNN supervised machine learning algorithm and segmentation MATLAB function, were employed to quantify retained austenite, with results compared to manual point counting method and XRD tests. A sequence of metallurgical and heat treatment processes was conducted to create the microstructural image dataset. Results showed that the specimens with no retained austenite in XRD tests did not reveal any in the microscopic images also, with only four cases out of sixteen showed retained austenite presence. The comparison showed reasonable and relatively close percentages to those calculated from XRD tests, with a maximum 2.37% difference with the MATLAB function, 4.91% with the KNN algorithm, and 2.76% with the manual method. The results suggest the potential for using this approach to confirm retained austenite presence and estimate its fraction without the need for XRD testing.