Leviticus 25:50

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.
Copyright information for ESV