DESPITE falling exports, China's economic growth has remained relatively strong this year thanks to a surge in investment sparked by the government's stimulus measures. Official data show that fixed-asset investment leapt by an astonishing 39% in the year to May, or by a record 49% in real terms. Sowing more today should yield a bigger harvest tomorrow, but how wisely is this capital being used?

Official figures almost certainly overstate the size of the spending boom: local bureaucrats may well be exaggerating investment in order to impress their masters in Beijing. More important, the government's figures misleadingly include land purchases and mergers and acquisitions. But even if measured on a national-accounts basis, like GDP, investment is probably growing at a still-impressive real annual rate of around 20%. This year China's domestic investment in dollar terms is likely to exceed that in America (see chart).

There is widespread concern that this investment boom is adding to China's excess capacity. Investment amounted to 44% of GDP last year (compared with 18% in America), which many economists reckon was already too much. Worse still, as well as forcing state firms to invest, the government is directing state-owned banks to lend more, despite falling corporate profits. Many of those loans could turn sour. Like Japan in the 1980s, it is argued, an artificially low cost of capital causes chronic overinvestment and falling returns. If so, it will end in tears. To assess that risk you need to ask two questions. How much excess capacity was there already? And where is the new investment going?

There is certainly excess capacity in a few sectors (steel and some export industries, such as textiles). But the best measure of spare capacity for the economy as a whole—the difference between actual and potential GDP, or “output gap”—is probably only about 2% of GDP, compared with an average of almost 7% in the rich world.

The large role played by state-owned banks is bound to have resulted in some misallocation of capital, but a recent study by Helen Qiao and Yu Song at Goldman Sachs argues that concerns about overinvestment are exaggerated. A successful developing economy should have a high ratio of investment to GDP. And a rising rate does not mean that the efficiency of capital is falling; capital-output ratios are supposed to increase as economies develop. America's capital stock is much larger relative to its GDP than China's, with 20 times more capital per person than in China.

A better measure of capital efficiency is profitability. Profits have indeed slumped over the past year, but taking the past decade to adjust for the impact of the economic cycle, profit margins have not narrowed as one might expect if there were massive spare capacity. The argument that the average cost of capital is ludicrously low is also no longer true. China's real interest rate is now 7%, which is among the highest in the world.

Where is the new investment going? There has been little new spending in industries with overcapacity, such as steel and computers. But the surge in state-directed investment has fuelled fears about its quality. In its latest China Quarterly Update, the World Bank calculates that government-influenced investment so far this year was 39% higher (on a national-accounts basis) than a year earlier, while “market-based” investment rose by a more modest 13%. This implies that government-influenced investment accounts for about three-fifths of the growth in investment this year, up from one-fifth last year.

The usual assumption is that government investment is less efficient and will therefore harm long-term growth. But the fastest expansion in spending has been in railways (up by 111% this year). As a developing country, China still lacks decent infrastructure; railways, in particular, have long been an economic bottleneck. Investment in roads, the power grid and water should also yield high long-term returns by allowing China to sustain rapid growth.

And the government is focusing its infrastructure stimulus on less developed parts of the country where the benefits promise to be greatest. According to Paul Cavey at Macquarie Securities, fixed-asset investment in western provinces was 46% higher in the first four months of this year than in the same period of 2008, almost double the rise in richer eastern provinces.

Some of the money being spent in China will inevitably be wasted, but it is wrong to denounce all government-directed investment as inefficient. In the short term it creates jobs, and better infrastructure will support future growth. It is certainly not a substitute for the structural reforms needed to lift consumer demand in the longer term, but it could help. After all, without running water and electricity, people will not buy a washing machine.