A system for measuring a length variation between body portions in computer-assisted surgery between a preoperative condition and intra- or post-operative condition comprises a a rangefinder configured to measure its distance to at least one reference landmark on at least a first body portion of a patient from a known position relative to a second body portion. A support includes joint(s) allowing one or more rotational degree of freedom of movement of the rangefinder to point to the at least one reference landmark. An inertial sensor unit is connected to the rangefinder to produce orientation data for the rangefinder. A computer-assisted surgery processing unit has a tracking module for tracking the rangefinder in a virtual coordinate system using the orientation data, a coordinate system module for determining coordinates in the virtual coordinate system of the at least one reference landmark using the distance and the orientation data, and a length calculation module for measuring a length between the body portions using the coordinates, the length calculation module calculating and outputting the length variation between the body portions by using said length obtained from a preoperative condition and said length obtained from an intra- or post-operative condition. A method for measuring a length variation between body portions in computer-assisted surgery between a preoperative condition and intra- or post-operative condition is also provided.Un système pour mesurer une variation de longueur entre parties de corps dans la chirurgie assistée par ordinateur entre un état préopératoire et un état intra- ou post-opératoire comprend un télémètre conçu pour mesurer la distance qui le sépare d'au moins un repère de référence sur au moins une première partie de corps d'un patient à partir d'une position connue par rapport à une seconde partie de corps. Un support comprend une ou plusieurs articulations permettant d'obtenir un ou plusieurs degrés de liberté de mouvement