From a home owner point of view and who recently moved 3 x's in the last 2 years, my wife and I are very knowledgeable w/the housing markets we had to navigate. After reading a lot of the reply's to this question, I have to disagree w/most of them. The BLUF (military for bottom line up front) is that the over riding factor is the appraisal value. We have found that there are MAINLY only 4 factors that determine this number: # of BR's, # of baths, sq footage, comp values. Anything else is minor. Meaning that, in our opinion, you will only get a fraction return on upgraded kitchen and baths.
For example: if you have 2 houses in the same area and built at the same time w/the same parameters (sq footage, # baths, #BRs) and the one with the dated kitchen and bath and is selling for 200k. The other house has ploughed 50k + into the kitchen and bath. I would say that the updated house will sell for no more than 10k more (and this is being generous). It will definitely sell faster, no doubt, but the owner just took a 40k hit. Is it worth it? We would say, NO.
Our advice is, DO NOT ask this question to a real estate agent or bathroom/kitchen contractor. You must ask an appraiser. And trust me, the 4 points that I mentioned above are what it's all about.
What a seller can do is to put a face lift on what is there. New paint, toilet, counter top, floor and items that may cost some but are a fraction of a major gut job. A face lift of a kitchen/bath combined should be under 5k and then put you in a much better position to sell and you save 45k.
The only time we think a major gut job is worth it is if the areas are really shot and you will be living in the property for 20 + yrs in order to use and enjoy the update yourself. Then, because of inflation the property will naturally raise the value enough (hopefully) in order to eventually recoup the cost.