Let D = C be a simply connected domain and f be the Riemann mapping from D onto D. The Hardy number of D is the supremum of all p for which f belongs in the Hardy space H p (D). A comb domain is the entire plane minus an infinite number of vertical rays symmetric with respect to the real axis. In this paper we prove that for any p ∈ [1, +∞], there is a comb domain with Hardy number equal to p and this result is sharp. It is known that the Hardy number is related with the moments of the exit time of Brownian motion from the domain. In particular, our result implies that given p < q there exists a comb domain with finite p-th moment but infinite q-th moment if and only if q ≥ 1/2. This answers a question posed by Boudabra and Markowsky.