The author presents an algorithm, based on the classical formula
to compute the th Bernoulli number , defined by . The space requirement of this algorithm is bits and it involves bit operations. The algorithm can also be efficiently generalized to compute all Bernoulli numbers up to some point. This slightly improves on the previous algorithms of S. Chowla and P. Hartung [Acta Arith. 22, 113-115 (1972; Zbl 0244.10008)] and of D. E. Knuth and T. J. Buckholtz [Math. Comput. 21, 663-688 (1967; Zbl 0178.044)].