Until this week, investors were waiting to see what the Supreme Court would do about the 3.8 percentage-point surtax on investment income, part of President Obama’s health-care overhaul. The Internal Revenue Service hasn’t yet released guidance on the new tax.

So when the court affirmed the law on Thursday, investors—and tax advisers—started scrambling.