The neural mechanism of number representation and processing is currently under extensive investigation. In this functional magnetic resonance imaging study, we designed a number comparison task to examine how people represent and compare two-digit numbers in the brain, and whether they process the decade and unit digits in parallel. We manipulated the decade-unit-digit congruency and numerical distance between the pairs of numbers. We observed both Stroop-like interference and the distance effect in the participants' performance. People responded more slowly to incongruent pairs of numbers and pairs of a smaller distance. The inferior parietal cortex showed common and distinct patterns of activation for both attentional selection and number comparison processes, and its activity was modulated by the Stroop-like interference effect and the distance effect. Taken together, these results support both parallel and holistic comparison of two-digit numbers in the brain.