The invention relates to a sensor assembly in a gearbox which is used for positioning, where the sensor assembly comprises a relative to the gearbox housing (18) fixed sensor (20), and where the angle between the gearbox housing (18) and the output shaft (26) of a gearbox (14, 16) is measured using a to the output shaft (26) fixed and to the sensor (20) connected shaft (28), whereby a sensor assembly which measures the angle in the gearbox (14, 16) including the play in the gearbox (14, 16) is attained, which gives increased precision at the same time as gearboxes (14, 16) with play can be utilized for accurate angle positioning.