A data processing method, performed by a computer, for determining implant positions of two implant components relative to two bones, wherein each of the implant components is to be attached to one of the bones such that the implant components form a joint between the bones, and wherein an implant position is a relative position between the implant component and the corresponding bone, said method comprising the steps of:a) acquiring a set of target poses, wherein a target pose represents a relative position to be achieved between the two bones;b) calculating a set of virtual poses for a pair of virtual test implant positions, wherein the set of virtual poses comprises one virtual pose for each of the target poses and wherein a virtual pose represents a relative position between the two bones if the virtual test implant positions were applied as the implant positions;c) calculating a pose deviation value for each of the target poses, wherein a pose deviation value represents the difference between a target pose and the corresponding virtual pose;d) calculating an overall pose deviation value from all the individual pose deviation values;e) repeating steps b) to d) for different pairs of virtual test implant positions until the overall pose deviation value fulfils a minimisation criterion; andf) using the pair of virtual test implant positions for which the minimisation criterion is fulfilled as the implant positions.