John B. Anderson yesterday took the unusual step of detailing how much his campaign promises will cost, and he called on his two major party opponents to do likewise.

The independent presidential candidate charged that neither President Carter nor Ronald Reagan "has dared to present a full and fair cost accounting of his party platform. And for a very simple reason the American people would be shocked by the cold facts."

Anderson's own accounting evisions an increase in defense spending of 3 percent in foreign aid, new urban redevelopment and mass transit programs, a balanced budget by 1983 and no individual income tax cuts until at least that point.

It calls for increases spending for space programs, improved Medicare benefits, modest tax cuts to encourage savings, increases in energy research and creation of an Urban Reinvestment Fund to help cities rebuild streets, water systems and sewers.

He compares his revenues and spending estimates with those made by the Senate Budget Committee in August. In many cases, Anderson's estimates are similar to those of the committee, a respected bipartisan source.

Anderson, however, foresees larger deficits in the 1981 and 1982 fiscal years than the committee, due largely to new programs he wished to enact and to smaller revenues because of tax breaks he would like to give to business.

By fiscal 1983, Anderson forecasts his budget would call for an increase in foreign aid of $2.1 billion over current projected levels, a $500 million increase in space and technology spending, a $1.1 billion increase in mass transit spending, a $3.6 billion increase in health programs, a $2.2 billion increase in income security programs and a $500 million increase in veterans benefits.

Anderson says his defense program in fiscal 1983 would be $7.1 billion below projected estimates. The savings are based largely on his opposition to the proposed MX mobile missile. He favors, however, a sea-based antibalistic missile program and beefed-up conventional forces.

Anderson released his "budget impact statement" in Chicago where he spoke before the Chicago Association of Commerce and Industry. In his speech, the Illinois congressman charged that "both the Carter and Reagan budgets are constructed with mirrors."

"President's Carter's management of the economy has been a failure," he said, adding the president's proposed $27.5 billion tax cut "will fuel yet more inflation and drive interest rates up even higher."

As for Reagan, he said his economic "game plan defies common sense. He promises to cut personal income taxes by one-third, increase defenese spending sharply, retain essential government services, balance the budget and restore price stability. Every citizen can see that you can't do all this without huge cuts in government programs."

He also accused Reagan of trying to "outpromise Carter" in recent weeks by reversing his earlier opposition to federal aid for New York, the Chrysler bailout and promises for more aid to the steel industry.