Obamacare is in trouble. The federal website for buying insurance is a disaster, half the states have refused to expand Medicaid, and whether the whole thing will really save money is uncertain. Big as these problems are, however, the project's potential value is as great as ever, and its odds of success remain high. Bet against it at your peril.

Let's remember why this project was undertaken in the first place. The Patient Protection and Affordable Care Act is the United States's only plausible shot at providing health insurance for all its citizens -- something that voters in other advanced economies have long taken entirely for granted. The U.S. already spends 50 percent more on health care than any other developed country, yet it has the lowest coverage rates and some of the worst health outcomes in the developed world. The status quo is absurdly expensive and unfair.

Changing this is a colossal task that was never going to be easy. Acknowledging this doesn't excuse the surprising incompetence of President Obama's administration in preparing for the rollout of the insurance exchanges: Given the stakes, the shambles of the past few weeks should never have been allowed to happen. Nonetheless, the purposes and basic design of the reform effort remain valid, as time will prove.

Embarrassment aside, does the HealthCare.gov debacle threaten the project's medium-term viability? What if it so discourages people that a significant number decide not to sign up even after the site is fixed, or if the problems linger so long that the mandate must be suspended?

Even such bleak scenarios would not necessarily be fatal to the law. People who decide not to use the exchanges to buy insurance for 2014 can still do so in future years. The Congressional Budget Office has already assumed that use of the exchanges will almost double in the law's second year, and then double again the year after. A year of low enrollment won't break the system.

A more serious question for the long run is how well the exchanges will succeed at bringing down costs. The law's opponents have predicted "rate shock" by using a false comparison: between the cost of individual policies from the days when insurers could discriminate based on people's health and what they cost on the exchanges now that nobody can be denied.

What matters is whether insurers are able to offer policies on the exchanges at prices people are willing to pay, after accounting for federal subsidies. As insurers conclude that the law is here to stay, more will offer exchange-based plans, increasing competition and driving prices down.

Some GOP-led states that initially opposed the expansion have since signed on. In others, governors are working to sway legislators. And lawmakers in every noncomplying state are feeling pressure from health-care providers who want the new revenue. Most will eventually come around.

-- Bloomberg View