Although nonprofit theaters are earning more at the box office and getting more contributions from individuals, states and corporations than ever before, most ended last season with deficits, according to an annual survey by the Theatre Communications Group.

"The net deficit has doubled in the last year," said TCG director Peter Zeisler. "It's a very dangerous sign."

The Reagan administration has reduced federal support for the arts on the theory that the private sector should pick up the tab. The TCG report indicates that, in the theater world at least, and if federal funding remains at its current level, private contributions are going to have to increase even further to keep regional nonprofit theaters afloat. Nearly 30 theaters have folded since 1980, according to the report. Federal funding covered only 4 percent of operating expenses last year, down from a high of 6.5 percent in 1981.

"The theory that someone will pick up what the federal government doesn't spend clearly isn't working," Zeisler said. "The arts are as much a federal responsibility as education . . . Theaters are producing more and more work to generate more income, and turning into sausage factories, grinding out product. They are forced to be less adventuresome in repertoire, choosing smaller cast plays -- the opposite of what the nonprofit theater is supposed to be."

Foundations, which played a significant role in funding resident theaters when the movement began more than 25 years ago, are now contributing the least of the five major sources of revenue, giving 7 percent less in 1984 than the previous year, the survey found. Zeisler said foundations are giving to other social needs affected by government cutbacks, rather than the arts.

Participating in the survey were 230 theaters (including Arena Stage and the Folger Theatre), with annual budgets ranging from $57,000 to $8.8 million. Their contribution to "expanding our knowledge of an increasingly complicated and confounding world," as the report puts it, is beyond dispute. This year's Pulitzer Prize for drama went to a play originally produced at Chicago's Goodman Theatre, "Glengarry Glen Ross," and the commercial theater abounds with material generated by the nonprofit world, from "A Chorus Line" to "A Soldier's Play" to "Ma Rainey's Black Bottom."

Those 230 theaters employ 23,000 people, and their salaries, plus royalties, fees and commissions, account for 60 percent of all theater expenses. Of the 230, 100 were in the black at the end of last season, 9 broke even, and 121 had deficits. Box office receipts were up 11 percent and covered almost half of expenses. Season ticket holders increased by 30 percent.

TCG made a more detailed analysis of 37 theaters that it has studied over a five-year period. For them, federal funding from the National Endowment for the Arts' Theater Program was $7.2 million. "While the average grant . . .has grown from $23,684 in 1981 to $38,005 in 1984, the number of recipient companies has fallen by over 37 percent," wrote Robert Holley, who authored the survey. "These figures clearly reflect a shift in priorities."

Individual contributions increased 27 percent last year, making donors the largest single source of funds for the third year in a row. Corporate giving increased 24 percent, led by the Atlantic Richfield Foundation, the Dayton Hudson Foundation and the Exxon Corp. But the unpredictability of donated income has made efficient planning impossible for a number of theaters.

Expenses, on the other hand, increased 12 percent. While the workforce remained constant, salaries, fees and benefits rose 14 percent. More actors have been employed as company members rather than jobbing in, and the number of "actor work-weeks" rose 5 percent. Technical and production salaries increased more than any other category, partly because they had lagged behind artistic and administrative salaries for years, and partly because of the requirements of new or expanded facilities.

This is the third year TCG has produced a gloomy report, and there are no signs that the situation is going to improve.