The invention relates to a method of determining the sagittal rotation of a patient's pelvis based on a standard anterior posterior X-ray-image with known image parameters and a calibration of the image, for example by using at least one King-Mark calibration object. The angle of the pelvic rotation is determined between a pelvic plane which is orthogonal to the midsagittal plane of the pelvis, and the image plane of the X-ray-image. Assuming the patient's position shown on the X-ray-image represents a standard neutral position, the X-ray- image plane can be used as a functional reference plane for further calculations, for example during hip-replacement surgery. The present invention further relates to a corresponding computer program and system.