Leviticus 25:50-54

Darby(i) 50 And he shall reckon with him that bought him from the year that he was sold to him unto the year of jubilee; and the price of his sale shall be according to the number of the years, according to the days of a hired servant shall he be with him. 51 If there are yet many years, according unto them shall he return his redemption [money] out of the money that he was bought for; 52 and if there remain but few years unto the year of jubilee, then he shall reckon with him; according unto his [remaining] years [of service] shall he give him back his redemption [money]. 53 As a hired servant shall he be with him year by year; [his master] shall not rule with rigour over him before thine eyes. 54 And if he be not redeemed in this manner, then he shall go out in the year of jubilee, he and his children with him.