Abstract. Functional near-infrared spectroscopy (fNIRS) is a relatively low-cost, portable, noninvasive neuroimaging technique for measuring task-evoked hemodynamic changes in the brain. Because fNIRS can be applied to a wide range of populations, such as children or infants, and under a variety of study conditions, including those involving physical movement, gait, or balance, fNIRS data are often confounded by motion artifacts. Furthermore, the high sampling rate of fNIRS leads to high temporal autocorrelation due to systemic physiology. These two factors can reduce the sensitivity and specificity of detecting hemodynamic changes. In a previous work, we showed that these factors could be mitigated by autoregressive-based prewhitening followed by the application of an iterative reweighted least squares algorithm offline. This current work extends these same ideas to real-time analysis of brain signals by modifying the linear Kalman filter, resulting in an algorithm for online estimation that is robust to systemic physiology and motion artifacts. We evaluated the performance of the proposed method via simulations of evoked hemodynamics that were added to experimental resting-state data, which provided realistic fNIRS noise. Last, we applied the method post hoc to data from a standing balance task. Overall, the new method showed good agreement with the analogous offline algorithm, in which both methods outperformed ordinary least squares methods.