Uncle Sam may have an unexpected windfall this year: taxes garnered from the rising stock market. Some economists have made very rough estimates that it could amount to perhaps $18 billion, or 7 to 10 percent of the federal budget deficit, assuming that investors realize their profits.
''It's all hypothetical,'' says William V. Sullivan Jr., senior vice-president of the Bank of New York, adding, ''But it's also very logical.''
A spokesman for the United States Treasury says the department has not made a study of the impact of a rising stock market on revenues. ''Undoubtedly it's positive,'' though, he says.
When stock prices climb and investors take profits, they owe capital gains taxes on those profits. Economists figure that estimates of the budget deficit have been based on conservative estimates of stock profits - particularly considering that the Dow Jones industrial average was flirting with the 1,100 level last week.
The paper profits investors have accumulated have already been substantial. The value of all the stocks on the New York Stock Exchange increased $311.797 billion between July 1 and December 31. And, according to the exchange, 56 percent of the stocks on the Big Board are held by individuals.
Adding in the rise in stocks on the American Stock Exchange, the over-the-counter market, and the bond market, the gains are even more dramatic. Arnold Moskowitz, first vice-president of Dean Witter Reynolds Inc., notes that consumers' equity positions at the beginning of January had risen to $1.450 trillion, from $1 trillion in July. He noted that this $450 billion increase ''dwarfs the tax cuts.''
The Treasury has already noticed a difference. When big traders make money, they have to pay estimated taxes on their gains. According to Mr. Sullivan at the Bank of New York, the Treasury received $14 billion in tax receipts in January other than taxes withheld from paychecks. These receipts in large part consisted of taxes paid by traders on stock gains. This was 20 percent higher than the year-ago period. ''It breaks a trend of declining revenues in this category,'' he said.
Last April tax payments in the nonwithheld category were $35.2 billion. Mr. Sullivan figures it could be much higher than that this April. How much higher? He figures as much as $7 billion to $8 billion. He points out that this will come when the government's financing needs are lower. Thus, he says, ''this could have a more meaningful impact, since the bond calendar is smaller.''
It is in the months and years ahead, however, that the amounts could rise substantially. Mr. Moskowitz notes that many people fail to make quarterly payments when they have capital gains. Instead they will wait until 1984. Thus, he thinks the Treasury may feel the impact of the rising market later rather than sooner.
Even though stock prices are up, economists point out, one must only assume that investors are taking profits. ''We've had record volume,'' Mr. Sullivan said, ''so in my naivete, I assume someone is cashing in his chips.''
Figuring the actual amount of profits at this point ''is pure guesswork,'' says William Freund, chief economist at the NYSE. If one assumes that the market maintains its current gain of $450 billion, however, and that 20 percent of the investors realize their profits, it could mean taxable revenue of $90 billion. The long-term capital-gains tax is 20 percent. So this could add $18 billion to the Treasury. But revenues could be much higher than $18 billion (assuming investors take their profits), since some of the gains will be short term and thus taxed at an individual's personal tax rate, which would for the most part be higher. For many the rate could be 50 percent.
Dr. Freund says such a gain ''could be substantial'' for the Treasury. But he quickly adds, ''It doesn't change the circumstances of an extraordinary deficit. It will help but it will not solve it.''
In fact, Irwin Kellner, an economist with Manufacturers Hanover Trust, says the increased revenue from capital gains may only offset the government's mistake in not adjusting the personal withholding tax in 1982 to reflect the cut in taxes already passed by Congress. Come April, he says, individuals will get bigger tax refunds, since the government was overwithholding on individuals who made more than $30,000 per year.
Almost everyone, however, agrees that the rising stock market will help the economy.
''You don't have to realize the gains to feel richer,'' Dr. Freund points out. And Mr. Moskowitz says that ''if the consumer feels wealthier, he keeps spending.'' He estimates that consumers might spend about 5 percent of any windfall made. Based on today's gains, this could add another $22 billion to the economy.