We prove that a 2-group has exactly five rational irreducible characters if and only if it is dihedral, semidihedral or generalized quaternion. For an arbitrary prime p, we say that an irreducible character χ of a p-group G is “almost rational” if ℚ(χ) is contained in the cyclotomic field ℚp, and we write ar(G) to denote the number of almost-rational irreducible characters of G. For noncyclic p-groups, the two smallest possible values for ar(G) are p2 and p2 + p − 1, and we study p-groups G for which ar(G) is one of these two numbers. If ar(G) = p2 + p − 1, we say that G is “exceptional”. We show that for exceptional groups, |G: G′| = p2, and so the assertion about 2-groups with which we began follows from this. We show also that for each prime p, there are exceptional p-groups of arbitrarily large order, and for p ≥ 5, there is a pro-p-group with the property that all of its finite homomorphic images of order at least p3 are exceptional.