When the history of the 1980 presidential election is written, it will likely be said that both President Carter and Ronald Reagan clinched the nominations of their parties in Illinois.

With nearly 30 percent of the delegates to both national party conventions now determined, Democratic challenger Edward M. Kennedy and Republican contenders John B. Anderson and George Bush face nearly insurmountable mathematical obstacles in their efforts to overtake Carter and Reagan.

Based on the first eight primaries and delegates projections from already-decided caucus states, Carter already has about 36 percent of the Democratic delegates needed for nomination. Kennedy's best state, Massachusetts, is behind him.

Reagan has 25 to 28 percent of the Republican delegates needed for nomination, and his best state is still to come. His strongest challenger, Rep. John B. Anderson, is not even on the ballots in New York, Texas and Pennsylvania.

What seemed only a few weeks ago to be a wild and unpredictable political season has settled down rather quickly into a two-man race between the incumbent Democratic president and the front-running Republican challenger.

If Carter wins 100 or more delegates in Illinois, as seems assured, he will have 600 of the 1,666 Democratic delegates needed for nomination. Reagan will have between 250 and 280 of the 998 Republican delegates needed. Both numbers are larger than the formal totals used in network computations because they include delegates from caucus states that have been decided but not formally selected.

This does not necessarily mean that Kennedy, Bush and Anderson will drop out of the race. In fact, all three have vowed to continue.

However, the impressive performances of Carter and Reagan through Illinois appear to give them a nearlock on the nominations, and are certain to focus attention on a Carter-Reagan general election contest, as Reagan has been trying to do for several days.

Their opponents, though still in the race, are now dependent on miracles rather than mathematics.

White House press secretary Jody Powell estimated last night that Kennedy will have to win 60 percent of the delegates in the remaining states in order to be nominated. "It is difficult to do," Powell said.

Kennedy delegate counter Rick Stearns, speaking before the Illinois vote, said, his candidate would have to win 53 percent of the remaining delegates.

Assuming, however, that Carter wins majorities in the upcoming southern primaries of Louisiana, Texass, North Carolina, Tennessee, Kentucky and Arkansas, Kennedy would have to capture more than 60 percent of the delegates in the five big primaries of Pennsylvania, Michigan, California, Ohio and New Jersey to be nominated, Stearns conceded.

Powell said Kennedy now needs "a series of consistent landslides to win the nomination," and added "It's getting to the point now that it's instructive to count delegates and look to the mathematics of the situation."

The arithmetic is even more impressive for Reagan, who stands next week to win a minimum of 45 and as many as 65 to 123 delegates in New York state, where Bush delegates are on the ballot in only a handful of districts and Anderson delegates are not on the ballot at all. Reagan won only 20 of 153 New York delegates against Gerald R. Ford in 1976.

Even when Reagan went into a slump after his loss in the Iowa caucuses in January and trailed Bush in some Eastern states, he led by 20 percentage points or more in polls taken in California. Reagan is a presumptive favorite in all quarters to win the 168 delegates in California's winner-take-all primary June 3.

There also are five convention state s with 133 delegates -- Arizona, Colorado, Oklahoma, Utah and Wyoming -- where Reagan forces have no serious opposition. Reagan won 147 of 156 delegates in these states in 1977.

Similiar victories this time, plus the delegates already won, plus California delegates and New York, would give Reagan at least 600 delegates, more than 60 percent of the number needed for nomination.

This means Reagan can be nominated by winning as few as one-third of the delegates from the other remaining primary states.

The strength of Reagan's present position becomes apparent when his performance of 1980 is compared with that of 1976. Reagan has won seven of eight primaries so far this year. In the six states which also held 1976 primaries he has run ahead of his delegate totals in all of them and ahead of his popular vote performance everywhere except Massachusetts.

At this time four years ago Reagan had lost five straight primaries and was considered out of the race. States where he scored his more impressive 1976 victories, such as North Carolina, Texas, Indiana, Nebraska and California, have yet to choose any delegates.

Reagan opponents keep hoping that he will make some major gaffe that will cost him votes. Kennedy supporters point to various signs that public support for Carter's foreign and economic policies is declining.

But even if Reagan stumbles and Carter falls in the polls, the proportional representation system uniformly enforced in the Democratic Party and generally followed by the Republicans gives the two leaders a huge advantage. Even if one of them loses a primary, he will still get a proportionate share of the delegates.

"Proportional representation, which has until this point cut against us, will begin quickly now to cut the other way," Powell said, "a reality that applies with equal force to Republican nomination."