We propose a fast, efficient, general, simple, valid and robust method of estimating and making inference about the delay of the fMRI response modeled as a temporal shift of the hemodynamic response function (HRF). We estimate the shift unbiasedly using two optimally chosen basis functions for a spectrum of time shifted HRFs. This is done at every voxel, to create an image of estimated delays and their standard deviations. This can be used to compare delays for the same stimulus at different voxels, or for different stimuli at the same voxel. Our method is compared to other alternatives, and validated on an fMRI data set from an experiment in pain perception.