See: What to do before you sell, give away, or trade in your iPhone or iPad - Apple Support
For some idea of how long a iPad may be support the most recent update, the iPad 5th generation is the newest iPad that does not support the current iPadOS. The 5th generation was released in March 2017.
Another example, iPad Pro released in March 2016 are the newest models that don't support the current iPadOS.
The move are examples of current updates and may not reflect what happens in the future.
The above models are still very usable, they just won't run the current iPadOS.