An assembly for joint surgery comprises a goniometer (12) for determining an angle for hip surgery, and a surgical tool (14) comprising an axis of extension. The goniometer comprises an indicator (24) and a contraindicator (26) configured to indicate an angle between at least a portion of the indicator and at least a portion of the contraindicator with respect to a first axis of rotation. The goniometer is connected to the surgical tool with at least a first rotary joint (34) arranged so as to be rotatable about a second axis of rotation substantially perpendicular to the axis of extension and a second rotary joint (36) arranged so as to be rotatable about a third axis of rotation substantially parallel to, preferably coinciding with, the axis of extension such that the axis of rotation of the goniometer is arrangable with respect to the axis of extension in three dimensions.