Americans are split almost down the middle on whether to restrict imports from Japan and other countries to deal with the nation's trade deficit, according to a Washington Post-ABC News poll.

There are, however, sharp differences in reactions to the trade issue among Americans based on age, income and education, the poll indicates.

These differences complicate the political judgments that face President Reagan and members of both parties as Congress braces for the hottest confrontation over trade in more than a generation.

Support for protection is strongest among elderly Americans, those who identified themselves as part of the "working class," and those who have not completed a high school education.

Opposition to trade sanctions against Japan and other nations is strongest among younger adults, those with some college education and an annual income of $50,000 or more, the poll shows.

The attitudes on trade were revealed in a Post-ABC survey last week of a random sample of 1,512 adults.

By a narrow margin, 49 percent to 43 percent, they said that the federal government should try to preserve American jobs by imposing taxes and limits on foreign imports, even if that means higher consumer prices.

The margin was even closer -- 48 to 47 -- in favor of restricting Japanese imports in particular, even if higher consumer prices resulted.

But there is not a simple "buy American" attitude driving these responses, the poll indicated. By 55 to 42, the public believes that they should not be expected to choose American products over foreign-made ones if the foreign goods are of better quality.

On this issue and others, the differences in response based on income, age and education were pronounced. Of those between the ages of 18 and 35, only 33 percent favored a "buy American" approach while 65 percent were opposed. The response among older Americans was almost exactly opposite: people 61 years of age and older favored buying American-made goods regardless of quality by a 61-to-35 margin.

People with some college education opposed a "buy American" approach by 72 to 26 while those who hadn't completed high school favored it by 62 to 35.

Similarly, opposition to the "buy American" idea increased with income. Poll results indicated that lower-income Americans and those who identify themselves as members of the "working class" are more concerned that they will be affected by the nation's trade deficit than those with more education or income. Concern about the trade issue also increases significantly with age -- it isn't a pressing problem for those under 30; it is for a majority of middle-aged and older Americans.

The poll gave people a range of possible reasons for the U.S. trade deficit and asked that they be ranked either as a major cause, a minor cause, or not a factor.

The most popular explanation for the trade deficit was the relatively higher wages and benefits of American workers compared with foreign workers -- 64 percent said they thought this was a major cause of the deficit.

Nearly as many -- 61 percent -- said foreign governments' restrictions on American imports were a major cause, supporting complaints by Democrats and many labor and business officials about a lack of fairness in the world trading system.

Sixty percent said the U.S. budget deficit was a major cause, while 57 percent of those polled put the high value of the dollar in that category.

Geoffrey Garin, president of Peter D. Hart Research Associates Inc., a firm that specializes in political surveys for Democratic candidates, said that the same split view on trade turns up in his firm's polls.

"There is an important group of voters out there that cares about the trade issue, and it's a group that is very important to the Democratic Party," said Garin. In the Post-ABC poll, Democrats give more support to a "buy American" approach and trade sanctions than Republicans or independents.

"There are some caution signals we give our clients, though," he said. " . . . . It is not just the sense of protecting, although they truly feel the trading system is unfair to Americans -- but it's also a sense that we ought to be doing better in terms of the country's competitiveness.

"If the Democratic policy is merely protectionist without the parallel commitment to excellence in the economy, it moderates the usefulness of the issue," said Garin.

Based on their readings of public opinion on the trade issue, Democrats see it as a prime political opportunity to weaken Reagan's hold on voters and build support for an activist Democratic economic policy.

Republicans, on the other hand, may take comfort from poll results showing that among some key segments of the voting public -- notably young, "middle class" adults and political independents -- attitudes on trade appear closer to the president's than to the Democratic party's.