Apple pretty consistently gives you 2 major updates before you start getting nudged hard to upgrade. Same here as with Macs. Compared to the competition across the board, this is really very good. And remember they do keep supporting the older stuff, but just not fully.
With Android, you are lucky if you get an upgrade at all. With Windows PCs, you get to upgrade to anything (they want to sell you the upgrade), even if it would run like a total pig, or not at all. Apple has the ability to control the whole thing and so keeps you at a certain level of performance by limiting some stuff on older hardware. There is a cost to supporting older hardware because they have to test and support every combination of hardware / software / features. Given that they charge nothing, or very little (OSX) for the upgrades, I think their approach is a good win/win for everyone.
So in your planning for hardware upgrades, its safe to plan for upgrades every other OS cycle... if you want to keep running the latest OS enhancements.