A recursive algorithm suitable for functional magnetic resonance imaging (FMRI) calculations is presented. The correlation coefficient of a time course of images with a reference time series, with the mean and any linear trend projected out, may be computed with 22 operations per voxel, per image; the storage overhead is four numbers per voxel. A statistical model for the FMRI signal is presented, and thresholds for the correlation coefficient are derived from it. Selected images from the first real-time functional neuroimaging experiment (at 3 Tesla) are presented. Using a 50-MHz workstation equipped with a 14-bit analog-to-digital converter, each echo planar image was acquired, reconstructed, correlated, thresholded, and displayed in pseudocolor (highlighting active regions in the brain) within 500 ms of the RF pulse.