How long will an i3 processor last?

if you have an entry-level laptop with Intel Core i3, Intel Core i5, AMD Ryzen 3, AMD Ryzen 5, or other similarly powerful CPUs, then you can expect it to last for 3-4 years which is slightly lower than other high-end processors.

I can still use my i5 and it is working fine. It is also how you take care on the battery, hard drive right?

I also have but the battery is dead. You are right, as long as you know how to take care of your laptop, you can still use it for years.