Leviticus 25:50

50 Then he and his buyer must take into account the number of years from the year he was bought until the year of jubilee. His sale price will be adjusted based on the number of years he was with his buyer, like the wages of a hired worker.