The rigidity of the positive mass theorem states that the only complete asymptotically flat manifold of nonnegative scalar curvature and zero mass is Euclidean space. We prove a corresponding stability theorem for spaces that can be realized as graphical hypersurfaces in Rn+1. Specifically, for an asymptotically flat graphical hypersurface Mn⊂Rn+1 of nonnegative scalar curvature (satisfying certain technical conditions), there is a horizontal hyperplane Π⊂Rn+1 such that the flat distance between M and Π in any ball of radius ρ can be bounded purely in terms of n, ρ, and the mass of M. In particular, this means that if the masses of a sequence of such graphs approach zero, then the sequence weakly converges (in the sense of currents, after a suitable vertical normalization) to a flat plane in Rn+1. This result generalizes some of the earlier findings of the second author and C. Sormani and provides some evidence for a conjecture stated there.