I recently crossed the 5 years mark in my current job.
I don't have much to complain. Everything is reasonably good: pay, co-workers, work itself.
Still, I often question myself how long should I stay. Is it harmful to my career to stay at the same company too long?
One of my worries is that the best opportunities for me would be remote, but given I live alone I would prefer to keep working in a hybrid way if possible. During the pandemic I felt really bad staying at home every day.
Young and just want to party? Change jobs every 4 months - just don't damage your resume or reputation. When you're young and have few responsibilities change jobs with the sole requirement of keeping it until it becomes useless, or less useful than you could otherwise find somewhere else. Even if this means couch surfing for a while. The whole point here is to get experiences and exposure.
Ready to settle down with that special someone and start a family? You may want safety and consistency. And the older you get the less you may be willing to job hop. If you're married with children you probably want a more stable income, which means less movement. This is not necessarily a bad thing.
Kids out of the house and ramping up for retirement? It might not be the end of the world to swing big and go back to the startup life. Or you may have built up enough tenure and reputation that it would be unwise to leave. The point being is you have some flexibility here as long as you've made smart financial decisions along the way.
Above 35 years of age(not there yet but my plan): IMO here you should just focus on maximizing how much you are paid vs the work you do.
This depends on what your goal is for your career.
If you want to be constantly moving up ladders, making more money, being at the leading edge of all new changes in this industry, and being ambitious overall, then you probably should be moving on.
But if you are OK with a simpler path, being happy in a job while making enough money to live your life even if it is less than you could make jumping around... there is nothing wrong with just working a job for as long as it makes you happy.
Oh, if you find a niche that ie rewarding and enjoyable, run with it. These aren’t all that common.
If ONE of these core elements change, THEN it’ll be time to move on.
There is an interesting formula for change. V and D (vision and dissatisfaction) are multiplied: V x D yielding the motivation to overcome R (resistance).
In other words, right now— if it ain’t broke, don’t fix it.
So, I don't think there is a 'right' amount of time.