Some companies keep a rainy-day fund. Overstock.com is preparing for the apocalypse.

Saying there’s a “10 to 20 percent chance” of a financial collapse in the next few years, the dot-com’s chief, Patrick Byrne, has stashed away $10 million worth of gold and silver, plus several thousand emergency preparation kits, complete with enough food rations to last his 2,000 employees and their families 30 to 60 days.

“We have food and gold, but we don’t walk around with guns or something. We’re not preppers,” Byrne told The Post.

“If there’s a financial system meltdown, if the Internet shuts down and credit cards shut down, we can pay people.”

Byrne said the survival stash is tucked away in some of Utah’s legendary storage bunkers like those built into Granite Mountain, which he claims are so secure, they could withstand a nuclear attack.

The Salt Lake City-based Overstock is a $1.5 billion online retail behemoth, known for offering steep discounts on home goods.

Byrne, 52, is a charismatic executive who has tangled with Wall Street banks over short-selling and installed an ATM for Bitcoin in company headquarters. He is Overstock’s largest shareholder, with a 26.5 percent stake.

Byrne pointed to the fragile US economy that has been artificially propped up by zero percent interest rates and quantitative easing, the poor quality of jobs created since the Great Recession and the massive federal deficit.

“One sign is that the government keeps the interest rate at zero, and that’s all our economy can really afford to pay, and when all our economy can afford to pay is zero, that tells you how fragile it is,” Byrne said. “It’s like a supersaturated liquid. If it starts to happen, it will unravel pretty quickly.

‘If there’s a financial system meltdown, if the Internet shuts down and credit cards shut down, we can pay people.’ - Patrick Byrne

“So many signs tell me this country has lost its way, with a bankrupt business model,” he added.

But critics say he’s pouring Overstock’s money into questionable projects — including $100 million for a new Roman Coliseum-style HQ building meant to resemble a peace symbol from above, and at least $8 million this year alone on a stock exchange for Bitcoin — when the company is losing money. For the third quarter, the company fell $2.1 million into the red on sales of $391 million, its first quarterly loss in nearly four years.

But it’s the precious metals and emergency supplies that have raised eyebrows the most.

“It’s unusual,” said Scott Schaefer, professor of finance at the David Eccles School of Business at the University of Utah. “There seems to be a strong market for emergency food supplies here in Utah, and that suggests a critical mass of people concerned about things like bank holidays and periods of social unrest.”

Byrne said his preparedness had nothing to do with the Mormon church, though it was appreciated by his Latter-day Saints employees.

“I’m not LDS. I’m a good Catholic boy from Vermont, a former altar boy, more of a Buddhist these days, but Utah and LDS, they have a culture . . . and a lot of people here liked that we did this for them,” he said. “It’s a very safe place to be if something happens.”