A prosthesis or orthosis (1) for a human ankle or knee comprising a first body (2), a second body (3) and an articulated joint (4) allowing the rotation of said bodies (2,3), a third body (47) arranged movably with respect to the first body (2), a first elastic element (52) mounted between the third body (47) and the second body (3), a second elastic element (59) arranged between the third body (47) and the first body (2) and a locking mechanism (50) such that when locked a first conversion ratio is applied defined by the first elastic element (52) and when unlocked a second conversion ratio is applied.