By separate routes, and with separate rationalizations, Jimmy Carter and Ronald Reagan have reached the same conclusion: The best way to campaign for the presidential nomination in 1980 is to campaign hardly at all.

President Carter decided Friday to bow out of the scheduled Jan. 7 Des Moines debate with his rivals for the Democratic nomination, in effect canceling the debate.

Reagan made the same decision weeks ago about next Saturday's debate among the Republican presidential hopefuls, thus robbing it of much of its significance.

Both men have constructed high-minded rationales for their decisions.

Reporters who lunched with Carter yesterday at the White House said that he thinks that, in this time of high tension and unpredictable developments in foreign affairs, the American people want what might be called a nonpartisan presidency.

Reagan invoked a similar principle in citing his own "11th Commandment" to speak no ill of another Republican, as his excuse for ducking the debate with six other GOP candidates.

But whatever the rationale, the two men are resorting to the classic strategy for the front-runner: Stay above the battle and let the others muddy themselves in the trenches.

Four years ago, the two men had very different views.

Reagan spent 19 long days on the campaign bus before the first primary in New Hampshire, going from town to town and store to store in pursuit of the voters. This year, he has logged barely two weeks of campaigning since he announced his candidacy almost two months ago.

In 1976, Carter visited more than 100 towns in Iowa before the caucuses. This year, he skipped his own announcement gala, two miles from the White House.

But last time, Carter and Reagan were underdogs. The president was "Jimmy Who?" trying to overcome a half-dozen better-known rivals. And Reagan was challenging incumbent President Gerald R. Ford.

This time, Reagan has been sitting on an unwavering 3-to-1 lead over his closet active challenger in the GOP preference polls. And Carter, after starting behind, has surged ahead of Sen. Edward M. Kennedy (D-Mass.), his principal rival, since the start of the Tehran hostage crisis effectively froze the campaign debate.

In his conversations with reporters yesterday, Carter said that he had overruled his political advisers in canceling out of the nationally televised Jan. 7 debate and that he was uncertain it was the right move politically.

But he said the hostage situation and the tensions provoked by the Soviet-backed coup in Afghanistan made it imperative not only for him to stay close to his desk, but also to take no personal actions that might jeopardize national unity.

Backers of his frustrated opponents, Kennedy and California Gov. Edmund G. (Jerry) Brown Jr., claim that Carter is hiding behind the twin crises to avoid confrontations with his challengers. They claim, as do the Republicans snapping at Reagan's heels, that the front-runners are short-changing the American people, who are entitled to an airing of issues by all candidates.

"Do you think for one minute that Carter would be ducking the debate if he were running behind Kennedy?" one exasperated associate of the Massachusetts senator asked yesterday.

The fact is that last fall, when Carter was trailing Kennedy, he did what no incumbent president had ever done in a nomination fight: he eagerly accepted an invitation to meet his challenger in a televised debate.

Now that their positions in the polls are reversed, Carter has reversed his decision, citing the international situation as his excuse.

A Carter adviser said yesterday, "There is a risk of a backlash, but it probably isn't as great as the risk he'd run if he suddenly stepped down from the position of national leader and engaged in some heavy exchanges with Kennedy and Brown. I think his own sense of what the country expects from him may be better than those on his staff who were urging him to debate."

At his luncheon yesterday, Carter said his hope is that the hostage situation will be resolved in time for him to campaign before long. But with the Iowa caucuses coming up Jan. 21 and the first primary in New Hampshire Feb. 26, he said, it may be necessary to find other ways, presumably through television and surrogates, to present his case to the voters.

Reagan's announced January schedule is a very light one compared to those of his rivals. He, too, is willing to forsake the personal appearances to remain out of his rivals' reach.

History suggests that neither man is making a mistake.

There is a paradox. While voters' demands for direct participation in the choice of candidates has lengthened the list of primaries and caucuses and opened the presidential campaign season earlier and earlier, those same voters frequently show a preference for the candidate who seemingly cannot be bothered to campaign.

It is true that some underdogs who got out there early and shook every available hand have made it to the nomination. That was true of John F. Kennedy in 1960, George McGovern in 1972, Carter in 1976. But they were underdogs, and had no other option. Established candidates have often found it best to shun, or seem to shun, the political trail. In 1952, New Hampshire Republicans ignored the active candidates and gave their backing to the famous absentee, Dwight D. Eisenhower, still on duty in Europe. They did the same thing in 1964, favoring Henry Cabot Lodge, then serving as ambassador in Saigon.

In 1968, Richard M. Nixon delayed and delayed his formal candidacy, letting his main opponent, then-Gov. George W. Romney of Michigan, talk himself out of the race before New Hampshire even voted.

In 1972, when he was president, Nixon loftily pretended to ignore two opponents in the early primaries, traveling to China just before the New Hampshire vote, which he won with ease. In the general election, he let his surrogates, especially Vice President Agnew and John B. Connally, do the bulk of the campaigning against McGovern, the Democratic nominee. He refused to debate, saying that was not "presidential."

In 1976, Ford found himself a distinct underdog to Carter after the conventions, so he offered to debate. But his more important decision was to stay off the campaign trial for most of the fall and "campaign" from the Rose Garden as president.

Carter's aides said after his hair-breadth victory over Ford that they had underestimated the advantages of a noncampaigning incumbent, but that they had learned their lesson.

John P. Sears, who is managing Reagan's campaign, had absorbed the same lesson from his service with Nixon in 1968.

As front-runners, Reagan and Carter are playing it by the book. And the book they have been reading says they are playing it smart.