Is there a 'guaranteed support period' for iOS? Traditionally [at least according to common knowledge] Macs have had mainstream OS support for 5 years, with legacy support for the next 5; meaning if you really want to hang onto that old machine, you should still be able to run the current OS at 10 years, give or take.
Obviously, there have always been distinct 'steps' where old hardware is legacied for specific hardware reasons - 64-bit CPUs, Metal GPUs, etc

Is there an equivalent 'guaranteed period' for iOS?

I found this - Apple KB: Vintage and obsolete products - for hardware support, but I can't find an equivalent for OS support on either Mac or iDevices.
Looking through Wikipedia: List of iOS devices it does seem shorter than Macs, but is there a 'rule'?
Apple supports hardware like iOS in the same 5+2 year pattern for Obsolete and Vintage hardware like all the rest of the hardware.

Apple supports software through AppleCare officially so that's 3 years but in practice, it's always been N+2 releases with N being the current OS and two older ones. AppleCare generally has terms limiting support to N+1 so look for wording like prior Major Release, but in practice Apple appears to be more generous supporting older OS than the agreement spells out in practice.


  Apple will provide support for the then-current version of the supported software, and the prior Major Release.


Same for upgrade, Apple doesn't commit anywhere you can run newer OS on hardware once you buy it (heck, they don't even guarantee the software will be fit for your purpose as is - current, sold today although consumer law likely makes them liable in some way for some level of fitness of purpose in many locations). In practice, the coat tails for running older hardware on newer OS are generous and long and break on CPU architecture boundaries generally as opposed to yearly release cycles.

Support means Apple issues security patches, fields support calls, generally makes it run on all hardware or will disable features like graphics to let older hardware run newer OS with some features disabled, but the majority of the system running.

Warranty and Guarantee and Software Licenses are legal terms, so I'll dodge them since they depend on  which locale you buy the goods and possibly which locale you import / use / seek support after purchase.

In the past the Apple Support pages would clearly list each supported OS, but with the newer redesign I can't locate that page but you can read the tea leaves by searching for archived support for older OS and hardware.


https://support.apple.com/macos