A new nationwide tax survey yesterday brought bad news for President Carter: Americans believe special tax breaks for capital gains are justified, and show "strong sentiment" for an even bigger tax writeoff.

Voters also want any tax relief for "middle-income" taxpayers aimed at families earning $20,000 to $40,00 a year - not those in the $10,000 to $19,00 brackets who are the targets of President Carter's controversial tax reduction plan.

And while 53 per cent of the public still favors a big tax cut this year, despite apprehension about the budget deficit, 58 percent wants to see Congress enact an automatic inflation adjustment for federal income taxes - a move Carter opposes.

Those are the findings of a nationwide survey by the Roper Organization, sponsored by H&R Block Inc., the tax-return preparation firm. The poll, taken in May, using 2,007 households, constitutes one of the most exhaustive studies of taxpayer attitudes.

The results mark another political blow for the Carter administration, which is in a battle with Congress over whether to reduce capital gains taxes and on the question of who should get the bulk of any tax relief.

On Tuesday, the House Ways and Means Committee voted to provide an inflation adjustment for capital gains taxes - which could mark a first step toward eventual "indexing" of all federal income taxes. Capital gains are profits from the sale of stocks or other property.

The study did provide support for Carter on some issues. Fifty-four percent said they opposed the notion of providing a tax credit for college tax-providing a tax credit for college rejected a credit for private and parochial schools.

An overwhelming 65 percent also supported the president's proposal to limit deductions for business meals - his so-called "three-martini lunch" provision - to only half the cost of the meal. And there was broad support for trimming other business deductions as well.

Respondents showed little support for rolling back last year's Social Security tax increase - a move that Carter opposes. And 34 percent favored Carter's 1977 plan to finance part of the system with ordinary income-tax revenues.

Finally, despite congressional worries about inflation, voters said they still wanted to see a big tax cut this year rather than scuttle the tax-reduction measure to help hold down the federal budget deficit. Some 53 percent favored a tax cut, compared to 37 percent opposed.

The survey was similar to one the Roper Organization conducted last summer, but contained questions pegged more to Carter's tax proposals, H&R Block Inc, paid for the poll, but stayed out of the sampling operation and not use the firm name in the questions.

On the issue of a "taxpayer revolt," the survey showed 51 percent of the public complaining that their taxes are excessive compared with 49 percent in 1977. Resentment was especially high among blacks and middle income white-collar workers.

The poll also confirmed - in the wake of the recent California vote on Proposition 13 - that taxpayers are most angry about property taxes, particularly in the western states. Taxpayer resentment about federal income taxes and state and local taxes was noticeably less-pronounced.

Predictably, most taxpayers questioned said they favored "tax reform." But, just as predictably, they rejected the notion of repealing some existing tax breaks Carter has sought to eliminate - and said they didn't consider them to be "loopholes."

Besides capital gains, these included Carter's proposals to repeal the present deductions for state and local gasoline and sales taxes - two of his proposaed "reforms" considered most likely to pass. And most favored ending the double taxation of dividends and corporate profits.

On capital gains, the survey showed that a majority of those who had any opinion on the subject thought the present system of taxing only half the profit from the sale of stocks or other property is "reasonable" and does not consitute a tax loophole.

Moreover, 54 per cent said they thought the profit from the sale of a homeowner's principal residence should be tax-free under all circumstances.