The short answer is, you’ll know when the time is right for you.
There was a time when patients were advised to postpone hip replacement surgery for as long as possible – as the components used had a relatively limited life expectancy. This left many people living with pain for many years as they waited as long as they could bear. While this perception lives on, things are very different today. Significant advances in the components used and the surgical techniques mean not only is recovery faster and easier, but the components are now likely to last 30+ years. This means, that ultimately, the timing is up to you.
Of course, you’ll need a doctor to diagnose the cause of your hip problems, but the decision should be based on the extent to which your condition is limiting your day-to-day life. Two people with similar X-ray findings will likely have very different perceptions of how restricted their lives are, or the pain they are experiencing. Ask yourself, is your hip pain making your life smaller, or slowly reducing the number of activities you can participate in? It might be time to consider a replacement.