An electric stove lasts between 10 years to 15 years.
However some electric stoves may last as long as 20 years or even more.
But most people will replace their electric stove with a new one long before it actually quits on them because they may want to remodel their kitchen, update their appliances etc.
I have an electric stove in my house that is 15 years old and even if it's still working in the next 5 years I'll be replacing the stove when I remodel the kitchen.
I want to update the kitchen in the next 5 years and a new stove, fridge etc will be put in the kitchen to update it.
A gas stove or gas range usually lasts 10 years to 20 years as well.
But most people will replace the appliances to update them with new appliances before they actually go bad and stop working.
Some people who can afford to do so want to update their kitchen with fresh new appliances.
However some people that cannot afford the newest appliances will use their current appliances until they actually go bad and stop working.