Exactly as others have said; it depends on the horse.
Last year I was competing a 26 year old horse through 3'7" and schooling through 4'. He was happy, sound, and enjoying it. However the majority of horses can't continue jumping that high when they're 26. There's also always maintenance involved with older horses. This horse in particular that I rode needed hock injections every 6 months (not too surprising, considering horses half his age are on a schedule like that) and was also on a joint supplement (also not surprising).
"Always be yourself. Unless you can be a unicorn. Then, always be a unicorn."