Abstract. We present an algorithm for computing the class number of the quadratic number field of discriminant d. The algorithm terminates unconditionally with the correct answer and, under the GRH, executes in O ε (|d| 1/4+ε ) steps. The technique used combines algebraic methods with Burgess' theorem on character sums to estimate L (1, χ d ). We give an explicit version of Burgess' theorem valid for prime discriminants and, as an application, we compute the class number of a 32-digit discriminant.