* Trade swings to A$1.2 bln surplus from A$1.1 bln deficit

* Exports boom on surging prices for iron ore, coal

* Windfall for mining profits, national income, tax take

SYDNEY, Jan 6 (Reuters) - Australia boasted its first trade surplus in almost three years in November as surging commodity prices boosted export earnings beyond all expectations, a much-needed windfall for mining profits, national income and tax revenues.

Friday’s data from the Australian Bureau of Statistics showed a trade surplus of A$1.24 billion ($908.92 million)in November, far above forecasts of a A$500 million deficit.

Exports jumped by 8.4 percent, or a whopping A$2.3 billion, to top A$30 billion for the first time ever. Coal, iron ore and rural exports all enjoyed double-digit gains, while imports were unchanged on the month.

November’s barnstormer ended a 31-month run of deficits and is likely a just a taster of more to come as prices for many key resources remain strong on the back of sustained Chinese demand.

The Reserve Bank of Australia’s index of commodity prices, which mirrors the country’s resource mix, surged 11.8 percent in November and another 9.3 percent in December.

That left the index up almost 40 percent on a year earlier, while bulk commodities alone were 85 percent higher. Much of that is still not fully reflected in the official trade numbers.

It should appear quickly in corporate profit, however. Analysts have been busy revising up profit for the resource sector and now expect BHP Billiton, for instance, to report an increase of 35-40 percent in earnings when it releases half-year results in February.

BHP’s stock has climbed 48 percent in the past year and others have done even better. Iron-ore miner Fortescue has risen 216 percent in the same period.

The stars have also aligned for the farm sector. Export volumes of wheat are set to be swelled by a bumper crop after the government raised its forecast for production during the 2016/17 season by more than 16 percent.

With harvesting underway, 2016/17 is shaping up as Australia’s biggest wheat crop ever.

All of which has helped stabilise sentiment in the resources sector after a run of tough years, and should underpin jobs and wages going forward.

It is also a windfall to tax revenues at a time when the conservative government of Malcolm Turnbull is struggling to maintain the country’s triple-A credit rating in the face of interminable budget deficits.

Scott Haslem, an economist at UBS, estimates a 10 percent rise in non-rural commodity prices benefits the budget by A$2.2 billion initially, rising to A$5.4 billion after one year.