Alexander Hamilton introduced the idea of federal taxes. Broadway producers enjoying a record season buoyed by his namesake musical are lobbying Congress to limit what they owe.

The industry, which will celebrate its success tonight at the Tony Awards, is fighting to keep a provision that allows live-theater backers deductions in a show’s first year. That means they’d pay tax on income only after turning a profit. The provision passed in 2015, yet needs to be extended by Congress this year to survive.

In an industry where four of five performances close without recouping startup costs, producers say such a sweetener will keep the hits coming. While the provision was tacked onto a list of tax breaks last year at the behest of Sen. Chuck Schumer, D-N.Y., there’s no guarantee it will be continued, producers and their lobbyists say. Some lawmakers don’t like the idea. Nor do advocates of tax cuts, who say such breaks make it more difficult to reduce the burden on everyone else. ...

At stake, according to Broadway producers, is the continued health of an industry that contributed more than $12 billion to New York City’s economy last year, bolstered by sold-out hip-hop musical “Hamilton” and other hits such as “The Lion King” and “Wicked.” Producers say the industry’s high-risk nature precludes them from financing shows with money from banks or venture capitalists.

Aside from the daunting odds of scoring a hit, it’s struggling with increased costs, said producer Tom Viertel, whose credits include “Penn & Teller on Broadway,” “The Producers” and “Angels in America.” In the 2014-15 season, Broadway investors lost more than $200 million on shows that didn’t make it, he said.

The IRS code made raising money even more difficult by requiring producers to estimate how long it would take for a show to recoup its initial capitalization, and based on that, investors would have to pay taxes on the show’s anticipated first-year profit, which producers called “phantom income.” If the show didn’t make money, investors could apply for refunds on their tax payments years later.

“Our investors would get irritated when they found themselves paying taxes before they got money back,” Viertel said. “The notion of paying a tax on a profit you haven’t received is obnoxious, and it took six years of hard lobbying to solve the problem.”

Just how many Hamiltons can “Hamilton” make? Broadway’s new blockbuster has only been open for 10 months, but already, this hip-hop musical about America’s founding fathers is one of the great successes in recent theatrical history. ...

All that enthusiasm means a lot of money for the men and women who brought the show to Broadway. Months ago, “Hamilton” recouped the $12.5 million it cost to mount. It is now making an estimated $600,000 a week in profit, and every indication is that its touring productions, which begin in Chicago in September and in San Francisco next March, will be highly profitable, too.

Producers and investors together stand to make tens or even hundreds of millions of dollars. Mr. Miranda will become quite wealthy. And a diverse group of collaborators — from the lighting designer to Mr. Miranda’s show-tune-loving father — will share in the bounty.

Even if “Hamilton” isn’t playing in Bangkok decades after its debut (as was the case with “Phantom of the Opera”), it’s not unreasonable to expect that Mr. Miranda’s unlikely hit will ultimately generate upward of $1 billion in sales.

Forecasting the future for “Hamilton” is risky, but the show’s current fortunes, and the model provided by other shows, are instructive. Here, based on documents filed with government agencies and interviews with people familiar with various aspects of the musical’s finances, is a look at how “Hamilton” makes money and where that money goes.