Chief Justice Roberts casts the deciding vote. The individual mandate is constitutional because it is a tax, but without compulsion to pay. Virtually the entire act is upheld, except for certain provisions regarding Medicaid.

From ScotusBlog:

The Affordable Care Act, including its individual mandate that virtually all Americans buy health insurance, is constitutional. There were not five votes to uphold it on the ground that Congress could use its power to regulate commerce between the states to require everyone to buy health insurance. However, five Justices agreed that the penalty that someone must pay if he refuses to buy insurance is a kind of tax that Congress can impose using its taxing power. That is all that matters. Because the mandate survives, the Court did not need to decide what other parts of the statute were constitutional, except for a provision that required states to comply with new eligibility requirements for Medicaid or risk losing their funding. On that question, the Court held that the provision is constitutional as long as states would only lose new funds if they didn’t comply with the new requirements, rather than all of their funding.

* * * *

Chief Justice Roberts demonstrated great statesmanship in guiding the Court to this decision. He avoided the messy arguments surrounding the use of the Commerce Clause to justify the individual mandate and arrived at a solution that makes the health care system all-inclusive by imposing a tax on non-payers. The two most recent important cases decided by the Court reinforce the notion that you can’t judge the outcome of a case by oral argument. In the Arizona immigration case, various justices questioned why states couldn’t have a shared role in immigration policy with the federal government. But the decision made it clear that the Constitution gives the federal government full authority over immigration and naturalization. In the matter of the Affordable Care Act (I guess that the phrase “Obamacare” will gradually disappear from the political lexicon), the savants who commented on the oral argument agreed that the solicitor general did a terrible job in defending the administration’s point of view, but the result was in favor of the administration.

While this is obviously a victory for the president, it is also a victory for the many Americans who have health care problems. The current system, as the president has said many times, is unsustainable. It is hard to argue with that. The huge number of uninsured Americans, the spiraling cost of health care, and the cumbersome process of going through insurance companies to get coverage have made for a very creaky system. The Affordable Care Act addressed many of the issues that afflict the health care system. Yes, it is a huge and costly government intervention of the sort that many Americans–Republicans and Democrats alike–will decry. But it has the promise of actually solving a major problem in American society, something our political system has not done very well lately. I suspect that Chief Justice Roberts took these aspects of the case into account in arriving at a wise and far-reaching decision.