The blood oxygenation level-dependent (BOLD) contrast is widely used in functional magnetic resonance imaging (fMRI) studies aimed at investigating neuronal activity. However, the BOLD signal reflects changes in blood volume and oxygenation rather than neuronal activity per se. Therefore, understanding the transformation of microscopic vascular behavior into macroscopic BOLD signals is at the foundation of physiologically informed noninvasive neuroimaging. Here, we use oxygen-sensitive two-photon microscopy to measure the BOLD-relevant microvascular physiology occurring within a typical rodent fMRI voxel and predict the BOLD signal from first principles using those measurements. The predictive power of the approach is illustrated by quantifying variations in the BOLD signal induced by the morphological folding of the human cortex. This framework is then used to quantify the contribution of individual vascular compartments and other factors to the BOLD signal for different magnet strengths and pulse sequences.