Near infrared spectroscopy (NIRS) is a non-invasive method to measure brain activity via changes in the degree of hemoglobin oxygenation through the intact skull. As optically measured hemoglobin signals strongly correlate with BOLD signals, simultaneous measurement using NIRS and fMRI promises a significant mutual enhancement of temporal and spatial resolutions. Although there exists a powerful statistical parametric mapping tool in fMRI, current public domain statistical tools for NIRS have several limitations related to the quantitative analysis of simultaneous recording studies with fMRI. In this paper, a new public domain statistical toolbox known as NIRS-SPM is described. It enables the quantitative analysis of NIRS signal. More specifically, NIRS data are statistically analyzed based on the general linear model (GLM) and Sun's tube formula. The p-values are calculated as the excursion probability of an inhomogeneous random field on a representation manifold that is dependent on the structure of the error covariance matrix and the interpolating kernels. NIRS-SPM not only enables the calculation of activation maps of oxy-, deoxy-hemoglobin and total hemoglobin, but also allows for the super-resolution localization, which is not possible using conventional analysis tools. Extensive experimental results using finger tapping and memory tasks confirm the viability of the proposed method.