Let h(p) denote the class number of the real quadratic field formed by adjoining $\sqp$} where p is a prime, to the rationals. The Cohen-Lenstra heuristics suggest that the probability that $h(p)=k$ (a given odd positive integer) is given by $Cw(k)/k$, where C is an explicit constant and w(k) is an explicit arithmetic function. For example, we expect that about 75.45 % of the values of h(p) are 1, 12.57% are 3, and 3.77% are 5. Furthermore, a conjecture of Hooley states that
$H(x):=\sum_{p\le x}h(p)\sim x/8,$
¶ where the sum is taken over all primes congruent to 1 modulo 4.
In this paper, we develop some fast techniques for evaluating h(p) where p is not very large and provide some computational results in support of the Cohen-Lenstra heuristics. We do this by computing h(p) for all p
($\equiv1\bmod{4}$) and $p<2\cdot10^{11}$. We also tabulate H(x)
up to $2\cdot10^{11}$.