BY THE END of 1985, the United States had run up a foreign debt larger than Brazil's. By the end of 1986, that foreign debt was larger than Brazil's, Mexico's and Argentina's put together.

The trade deficit generates this debt, and a big trade deficit pushes it up fast. The Commerce Department published figures this week showing that the country's total foreign debt, public and private, came to $264 billion last Dec. 31. That figure, as the department's economists pointed out, is not a precise count but a rough estimate -- and, you should be aware, a deliberately conservative one. It does not take account of the inflows of foreign money that escape the statistical counting systems; the evidence suggests that these inflows have grown large over the past decade. How large? A reasonable estimate of the accumulated uncounted debt over that decade might be around $90 billion. And in the six months since the beginning of the year, the continuing trade deficit has added another $70 billion or so of debt. That suggests a total American foreign debt currently of about $420 billion.

Latin debts are mostly in the form of loans owed to banks in the United States, Europe and Japan. The American foreign debt is the difference between American investments abroad -- just over a trillion dollars, the Commerce Department says -- and the $1.3-plus trillion that foreigners have put here. Some of that foreign investment has gone into long-term direct investment such as building factories and buying companies. But most of it, more than $850 billion, is in the form of bank deposits and securities. It can be moved easily, and it is sensitive to market interest rates.

It's already putting constraints on American economic policy. If this country were to slide toward a recession, one traditional remedy would be to drop interest rates. But to keep financing its trade deficit, and to keep those invested billions of foreigners' dollars from fleeing, this country now has to hold its interest rates up. In the next recession the Federal Reserve Board will have far less flexibility than in the last one.

This rising debt is an erosion of national control and power. It has all happened under the current president. When Mr. Reagan came to office, the United States was the world's biggest creditor. The trade deficits started in 1982, and now the debt is swelling beyond anything in the world's experience. What's Mr. Reagan going to do about it? He's going to leave it, apparently, to his successor