when to replace my car

My car has a lot of running. I can’t afford an expensive car. Tracking expenditure and calculating per mile cost the car is giving - which way is better to find out it’s time to replace my car? Any other ideas?

this is not real estate question…
But if your car cost to much money to fix or keeps breaking down, just buy a new one…its a matter of choice…I buy a new car ever 2-3yrs and trade mine in since I hate car repairs and like driving something new.