Apple supports its smartphones for about five years after a model is released, giving the devices the latest versions of iOS and the latest patches to known vulnerabilities. That’s pretty generous considering that most people get a new smartphone every two or three years.
For example, if you are using an iPhone 4s, released in October 2011, it might be difficult to upgrade to iOS 10, released in September 2016. But you would be able to use iOS 9, released in September 2015.
The oldest iPhone that iOS 10 can run on is the iPhone 5, from September 2012. However, you can put money on the likelihood that the iPhone 5 won’t be able to run iOS 11… More at tom’s guide.
Apple and Samsung would like you to think no more than 2 years.