To these sellers, medical supplies are simply another hot product to flip for a profit. Avraham Eisenberg, a New York wholesaler who is trying to ship masks from China, compared the rush for masks to the fad several years ago for fidget spinners.

The Justice Department said last month that it would investigate people manipulating the medical-supply market. Five days later, federal authorities charged a Brooklyn man with lying about price gouging after he tried to sell 1,000 masks and other supplies to a doctor for $12,000. (He also was charged with assault after he claimed he had the coronavirus and coughed on F.B.I. agents.) Federal officials are now distributing the more than half a million supplies they confiscated from him.

Global demand and stacks of cash

In China, the competition is intense. A small number of Chinese factories are certified by the Food and Drug Administration to make N95 masks, and “those are the diamonds right now,” said Lily Liu, a Chinese hospital executive turned Silicon Valley entrepreneur who now helps run Operation Masks.

“What’s happening at those factories is France shows up in the morning, and then they get Germany at breakfast, and then Italy after lunch, and then the U.S. in the afternoon,” she said. “In between they get distributors showing up at their doorstep with stacks of cash.”

That demand has fueled the spike in prices. While some factory owners are probably making handsome margins, much of the price increase is likely spread across the supply chain, from the firms that ship and inspect the masks to those that make the masks’ fabric and the machines that assemble them.

Take Zhou Hua, the owner of a factory in Xuancheng, China, that months ago made children’s clothing. In February, as the coronavirus swept across his country, he rushed to buy mask machines and spent roughly $500,000 transforming his plant. Now his staff has nearly doubled to 75 employees, and they make 1.6 million masks a day.

He said his margins were modest, and blamed higher material costs for much of the price increases. Most masks use melt-blown fabric to stop tiny particles. Mr. Zhou said the price of that material had risen 90 percent to about $53 a ton. He added that the price for machines that weld straps to the masks had tripled, to roughly $2,100.