This is a good post, I'm glad someone brought it up. Figure you would have to bank around 1.4 million to safely be able to throw off an O-6 retirement check and enough to keep up with inflation. Yes, you could theoretically save that much after leaving the Navy, but it would take a lot of discipline.
That being said, the military knows this and there are a few aspects you need to look at.
1. Any one coming in now falls under "high 3" retirement. This means that the Navy (or Army/AF, all the same) takes your 3 highest years of income (base pay) and averages those to get your baseline base pay that is then divided by your retirement percentage (50% at 20 years, 2.5% per year of service thereafter up to 75% at 30 years). So, since you'll probably put on O-6 near the 20 year mark, you might get less money for retirement. It's still quite a bit of money, though, especially when you consider that it is cost-of-living adjusted for life as long as you draw a breath. No risk of wiping out your funds.
2. The military knows this, and is doing everything they can to minimize the number of Physicians drawing retirement. Anyone coming into the Navy from HPSP is a USNR, not USN. (USUHS is USN, so this doesn't apply) That means you are technically a reservist. On active duty, that means nothing day-to-day. Historically, after 4 years of active duty, you could "augment" to the regular Navy, USN. This provides you some protections, especially later in your career. If you are an O-5, USN, you essentially have job security. It's like getting tenure. O-5 is considered a terminal rank, one that you can ride until retirement. Lower ranks are not as safe, if you fail to select for O-4 or O-5, you can be sent packing with a severance package. If you're an O-5, you're allowed to stay until retirement. For the line officers, O-5 often comes quite late, 15 years or so is common. So, 20 is close and there are plenty of CO jobs, etc. for O-5's. For the medical Corps, though, O-5 comes early, and Docs are smart and realize that if they don't care about making O-6, they can play and find the good billets, hang-out, etc. The deadwood that you hear about, it does exist.
So, the point of this is as follows. The Navy has changed the rules and will now no longer let you augment to USN if you have any obligated service. That means, for those of us who return to residency, we can't augment until late in the game. For me, I'll have 12 years of service and likely be wearing O-5 before I could even ask to augment. (4 years DMO, 4 years residency, 4 years payback). Guess what, at that point they've gotten their pound of flesh out of me and there are more obligated service folks coming behind. Because I'll still be a USNR, I can be told at the end of my obligated service that my time in the Navy is done. No golden parachute, just out the door.
Now, combine this rule change with Rumsfeld's desire to trim the tooth to tail ratio, and PBD 712 drawing down billet size, and it doesn't take a big leap of logic to realize that the military is going to work hard to get Docs to leave before retirement. Getting someone to leave after residency payback but before retirement is the ultimate "good deal" for the government.
OK, so what, you were getting out anyway, right? Well, it's nice to think that it would be my choice to stay after payback was over. There will be jobs. But there will likely be a lot less, so coming into the military with an absolute plan to stay to retirement as a physician may not be a viable plan. This post is right, the military retirement structure is a good deal economically for those who stay. As with everything else, be sure that the military knows this and will do what is in its own best interest, not yours.
Those who know my posts will know that I think the HPSP and military medicine are a good deal, and I'd do it again. But I am a cynic at heart, and am a realist, and want everyone to have as much info as possible. Will I stay until retirement, I doubt it, but I will position myself to be one of the Docs they decide to keep so it will be my choice. I'll try at least, the next administration may want to double the Medical Corps and the whole plan will change again. So it goes...