A system for determining a distal cut thickness and posterior cut thicknessfor a femur in a knee replacement operation stores data relating to size andshapeof femoral implants. A tracking device tracks said femur and a tibia in areferencecoordinate system. A registration module is used for registering a femurrepresentation, a tibia representation and a femoral posterior cut to saidreferencecoordinate system. A gap measurement module is adapted to measure anextension gap and a flexion gap using said femur representation and said tibiarepresentation as registered in said reference coordinate system and adaptedtogenerate measurement data. A cut thickness computing module receives saidmeasurement data and calculates: a posterior cut thickness for said femurusingsaid extension gap and said flexion gap and taking into account a distalthicknessand posterior thickness of a femoral implant; and a distal cut thickness basedonthe flexion gap resulting from the femoral posterior cut registered in saidreferencecoordinate system. An output device outputs said measurement data andcalculated data calculated by said computing module.