Leviticus 25:50
Thus he shall reckon with him who bought him: The price of his release shall be according to the number of years, from the year that he was sold to him until the Year of Jubilee; it shall be according to the time of a hired servant for him.