But typically it's 7 for hardware repairs, until it is declared obsolete.You’re only guaranteed repair support for five years.
The 5 years is typically for software support. That's one big reason why I bought a cheap used 2014 Mac mini last year to run Monterey, as it wasn't discontinued until late 2018.