Leviticus 25:50-52

50He shall calculate with his buyer from the year when he sold himself to him until the year of jubilee, and the price of his sale shall vary with the number of years. The time he was with his owner shall be arated as the time of a hired worker. 51If there are still many years left, he shall pay proportionately for his redemption some of his sale price. 52If there remain but a few years until the year of jubilee, he shall calculate and pay for his redemption in proportion to his years of service.
Copyright information for ESV