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.

Surrounding context

25:49 or his uncle or his uncle's son may redeem him; or anyone who is near of kin to him in his family may redeem him; or if he is able he may redeem himself.

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.

25:51 If there are still many years remaining, according to them he shall repay the price of his redemption from the money with which he was bought.

Translation and sources