Cortical stiffness is an important cellular property that changes during migration, adhesion and growth. Previous atomic force microscopy (AFM) indentation measurements of cells cultured on deformable substrates have suggested that cells adapt their stiffness to that of their surroundings. Here we show that the force applied by AFM to a cell results in a significant deformation of the underlying substrate if this substrate is softer than the cell. This 'soft substrate effect' leads to an underestimation of a cell's elastic modulus when analysing data using a standard Hertz model, as confirmed by finite element modelling and AFM measurements of calibrated polyacrylamide beads, microglial cells and fibroblasts. To account for this substrate deformation, we developed a 'composite cell-substrate model'. Correcting for the substrate indentation revealed that cortical cell stiffness is largely independent of substrate mechanics, which has major implications for our interpretation of many physiological and pathological processes.