Forces acting within the area of atomic contact between surfaces play a central role in friction and adhesion. Such forces are traditionally calculated using continuum contact mechanics, which is known to break down as the contact radius approaches atomic dimensions. Yet contact mechanics is being applied at ever smaller lengths, driven by interest in shrinking devices to nanometre scales, creating nanostructured materials with optimized mechanical properties, and understanding the molecular origins of macroscopic friction and adhesion. Here we use molecular simulations to test the limits of contact mechanics under ideal conditions. Our findings indicate that atomic discreteness within the bulk of the solids does not have a significant effect, but that the atomic-scale surface roughness that is always produced by discrete atoms leads to dramatic deviations from continuum theory. Contact areas and stresses may be changed by a factor of two, whereas friction and lateral contact stiffness change by an order of magnitude. These variations are likely to affect continuum predictions for many macroscopic rough surfaces, where studies show that the total contact area is broken up into many separate regions with very small mean radius.