Leviticus 25:50
He 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 rated as the time of a hired worker.