The length of time required to gain adverse possession varies depending on the state and the circumstances of the case. Generally, it can range from 5 to 30 years.