People routinely make decisions based on samples of numerical values. A common conclusion from the literature in psychophysics and behavioral economics is that observers subjectively compress magnitudes, such that extreme values have less sway over choice than prescribed by a normative model (underweighting). However, recent studies have reported evidence for anti-compression, that is, the relative overweighting of extreme values. Here, we investigate potential reasons for this discrepancy in findings and examine the possibility that it reflects adaptive responses to different task requirements. We performed a large-scale study (N = 607) of sequential numerical integration, manipulating (i) the task requirement (averaging a single stream or comparing two streams of numbers), (ii) the distribution of sample values (uniform or Gaussian), and (iii) their range (1 to 9 or 100 to 900). The data showed compression of subjective values in the averaging task, but anti-compression in the comparison task. This pattern held for both distribution types and for both ranges. The findings are consistent with model simulations showing that either compression or anti-compression can be beneficial for noisy observers, depending on the sample-level processing demands imposed by the task.