Functional near infrared spectroscopy (fNIRS) is used for brain hemodynamic assessment. Cortical hemodynamics are reliably estimated when the recorded signal has a sufficient quality. This is acquired when fNIRS optodes have proper scalp coupling. A lack of proper scalp coupling causes false positives and false negatives. Therefore, developing an objective algorithm for determining fNIRS signal quality is of great importance. In this study, we developed a machine learning-based algorithm for quantitatively rating fNIRS signal quality. Our promising results confirm the efficacy of the algorithm in determining fNIRS signal quality and hence decreasing misinterpretations.