The government shutdown could take a bite out of the economy -- depending on how long it lasts.

Even if the shutdown drags on, it is likely to have only a limited impact.

The 16-day shutdown in 2013 was the costliest shutdown in the nation's history -- $20 billion, according to an estimate from Moody's Analytics. Official government figures suggest it reduced gross domestic product, the broadest measure of the nation's economic activity, by 0.3 percentage points.

If the current shutdown lasts just as long, it's possible it won't have as much impact, because the economy today is much stronger than it was in 2013.

"It's a hit, but it's digestable hit," said Mark Zandi, chief economist for Moody's Analytics. "The economy is so strong right now, it'd take a lot to derail it."

Federal government spending adds more than $1 trillion a year to the U.S. economy. But even if it shuts down, most of that money will eventually be spent.

Most of the nearly 2 million federal workers whose paychecks will be halted have been deemed essential: air traffic controllers and TSA agents at airports, prison guards and FBI agents. Members of the military, who are not counted in the 2 million federal government civilian workers estimate, also remain on the job, though their paychecks could also be halted temporarily. They will all definitely receive backpay if the shutdown drags on to their next payday. Most of those employees who receive direct deposits are due to be paid this coming Friday.

But even the workers sent home -- a total of 850,000 during the 2013 shutdown -- traditionally get paid for their time off. So do many government contractors whose checks may also be put on hold. Those businesses include janitorial and landscaping services, as well as defense contractors and construction firms working on public works projects.

Related: What's happening at the IRS during the shutdown

Many government benefits, such as Social Security checks and food stamps, will continue to be issued without interruption. Otherwise, that could significantly disrupt the economy. Tax refunds could conceivably be delayed, although it would take a longer shutdown to affect those. That's because with the changes in the tax system due to last year's tax reform bill, the IRS has already said people shouldn't file their 2017 returns until Jan. 29.

Any damage to the economy is more likely to come from federal employees and contractors spending less during the shutdown. The money they would have spent at restaurants, shops and other companies is economic activity that won't be recouped. If tourists cancel plans for travel to national parks during the shutdown, the hotels and other businesses that depend on those tourist dollars will also be hurt. Although many national parks remain open, they are generally not staffed.

Related: Here's what the last government shutdown looked like

"The dollars and cents of federal spending matter, but [the problem] was really the impact on confidence due to the uncertainty," said Zandi.

But the strength of the current economy, with both consumer confidence and business confidence near record high, should protect against a spending pullback.

"Sentiment now is as strong as it gets," he said.

That confidence is one of the things that has been driving the stock market to new records. A major correction could reduce household wealth and have an impact on the economy. But history suggests that investors shrug off government shutdowns as temporary events.

The S&P 500 was essentially unchanged during the longest shutdown on record, the 21-day shutdown in late 1995 and early 1996. Stocks rose during the 16-day shutdown of 2013.