We determine the order of magnitude of H(x, y, z), the number of integers n ≤ x having a divisor in (y, z], for all x, y and z. We also study Hr (x, y, z), the number of integers n ≤ x having exactly r divisors in (y, z]. When r = 1 we establish the order of magnitude of H1 (x, y, z) for all x, y, z satisfying z ≤ x1/2−ε . For every r ≥ 2, C 1 and ε 0, we determine the order of magnitude of Hr (x, y, z) uniformly.