The rule of thumb (and rules of thumb are notoriously inaccurate) is that a mortgage should be between 2x and 3x your annual salary (not 4x, it would be unaffordable). So, for a $500,000 home with 10% down, the mortgage would be $450,000. Your annual salary should be between $150,000 and $225,000 to comfortable afford this home.
Because the rule of thumb uses averages for both homeowner's insurance and real estate taxes you would need to peel the onion back another layer and do more calculations if you were already in that ball park.
The generally accept ratios for affordability are 28/36. This means that no more than 28% of your gross income should go for a housing payment (including PITI - principal, interest, taxes and insurance - and private mortgage insurance, if necessary). No more than 36% of your gross income should go toward all debt service including (but not limited to) mortgage, car loans, student loans, personal loans, credit card minimums, etc.
Real estate taxes are a huge wild card in this equation. I've lived in places with real estate taxes from 0.5% of the homes value up to (I'm not kidding here) 4% of the home's value per year. That's a range of $2500 per year to $20,000 per year. That changes the affordability of that $500,000 house drastically.
The short answer is that you need to make boatloads of cash to afford a $500,000 house.
This is also the reason that housing is in the crapper in many areas of the country as people who had no business even driving through neighborhoods of $500,000 homes were able to buy them with interest only or negative amortization loans that they couldn't afford.