Leviticus 25:50-54

MLV(i) 50 And he will reckon with him who bought him from the year that he sold himself to him to the year of jubilee. And the price of his sale will be according to the number of years. He will be with him according to the time of a hired servant. 51 If there is yet many years, according to them he will give back the price of his redemption out of the money that he was bought for. 52 And if there remain but few years to the year of jubilee, then he will reckon with him. He will give back the price of his redemption according to his years. 53 He will be with him as a servant hired year by year. He will not rule with rigor over him in your sight. 54 And if he is not redeemed by these means, then he will go out in the year of jubilee, he and his sons with him.