In this paper, we shall prove a sufficient condition for the quadratic fields Q(square-root(n2+4)) to be of class number two. Furthermore, under the assumption of the generalized Riemann hypothesis, we give a criterion for the quadratic fields Q(square-root(n2+4)) to be of class number two.