Leviticus 25:27

Amplified Bible (AMP)
then he shall calculate the years since its sale and refund the balance to the man to whom he sold it, and so return to his [ancestral] property.

Read Leviticus 25:27 in other translations