An electric shaver comprising: a main body (2; 202; 302), and a shaving unit having at least two cutting units exposed on a shaving face of the shaver, each cutting unit being mounted to a cutting unit carrier of the shaving unit and comprising an external cutting guard and an internal cutting member, a sensor comprising a first sensor unit mounted in a fixed position relative to the main body (2; 202; 302) and a second sensor unit mounted in a fixed position relative to a sensor unit carrier (22; 222; 322), the sensor being arranged and configured for outputting a signal indicating a distance of the second sensor unit to the first sensor unit in a direction parallel to a z-axis which is oriented transverse to the shaving face and extending centrally between the cutting units, wherein the shaving unit and the sensor unit carrier (22; 222; 322) are suspended to the main body (2; 202; 302) for displacement in unison from a rest position towards the main body (2; 202; 302) along the z-axis to a pushed-in position in response to a pushing force exerted onto the shaving face of the shaver, wherein a resilient member is provided between the main body (2; 202; 302) and the shaving unit, for exerting a force along the z-axis biasing the shaving unit in a direction from the pushed-in position towards the rest position, and wherein the first sensor unit and the second sensor unit are located in positions offset from said z-axis over a distance (d) in a direction parallel to an x-axis which extends perpendicularly to the z-axis, characterized in that the electric shaver comprises an anti-tilting guide (24-27; 124; 224, 226; 326, 328) for guiding at least the sensor unit carrier (22; 222; 322) with respect to the main body (2; 202; 302) against tilting about at least a y-axis which extends perpendicularly to the x-axis and the z-axis during movement of the shaving unit between the rest position and the pushed-in position along the z-axis. a main body (2; 202; 302), and a shaving unit having at least two cutting units exposed on a shaving face of the shaver, each cutting unit being mounted to a cutting unit carrier of the shaving unit and comprising an external cutting guard and an internal cutting member, a sensor comprising a first sensor unit mounted in a fixed position relative to the main body (2; 202; 302) and a second sensor unit mounted in a fixed position relative to a sensor unit carrier (22; 222; 322), the sensor being arranged and configured for outputting a signal indicating a distance of the second sensor unit to the first sensor unit in a direction parallel to a z-axis which is oriented transverse to the shaving face and extending centrally between the cutting units, wherein the shaving unit and the sensor unit carrier (22; 222; 322) are suspended to the main body (2; 202; 302) for displacement in unison from a rest position towards the main body (2; 202; 302) along the z-axis to a pushed-in position in response to a pushing force exerted onto the shaving face of the shaver, wherein a resilient member is provided between the main body (2; 202; 302) and the shaving unit, for exerting a force along the z-axis biasing the shaving unit in a direction from the pushed-in position towards the rest position, and wherein the first sensor unit and the second sensor unit are located in positions offset from said z-axis over a distance (d) in a direction parallel to an x-axis which extends perpendicularly to the z-axis, characterized in that the electric shaver comprises an anti-tilting guide (24-27; 124; 224, 226; 326, 328) for guiding at least the sensor unit carrier (22; 222; 322) with respect to the main body (2; 202; 302) against tilting about at least a y-axis which extends perpendicularly to the x-axis and the z-axis during movement of the shaving unit between the rest position and the pushed-in position along the z-axis.