UK pensioners could lose up to £32,000 (€42,050) off their assets if the UK votes to leave the European Union (EU), according to an analysis published by the UK Treasury.

But in contrast, a former work and pensions secretary warned that, if the UK stayed within the EU, EU pension directives could inflict major damage on pension funds.

The Treasury analysis relies on the conclusion of its own macroeconomic research, which was that “a vote to leave would cause an immediate and profound economic shock creating instability and uncertainty, which would be compounded by the complex and interdependent negotiations that would follow”.

George Osborne, chancellor of the Exchequer, said: “That shock would push our economy into a recession and lead to an increase in unemployment of around 500,000, average real wages would be lower, inflation higher, and house prices would be hit compared with a vote to remain.”

Under the “shock” scenario, higher inflation would erode the basic state pension by £137 per year in real terms by 2017-18 – compared with staying in the EU – while the “severe shock” scenario would increase this loss to £142 per year, said the analysis.

Someone receiving a basic state pension and an average annuity would lose £190 a year in real terms, according to the calculation.

The report also predicted declines in house prices and in UK equity and bond prices.

It said: “After two years, the total loss of wealth of those aged over 65 would be around £170bn in the shock scenario and £300bn in the severe shock scenario. For a person aged over 65 with the median portfolio of housing and non-pension assets, the loss in wealth is estimated to be around £18,000 in the shock scenario and around £32,000 in the severe shock scenario.”

Furthermore, the predicted long-term fall in incomes and profits would mean future pensioners were able to save less for their retirement, and earn lower investment returns, the report said.

It calculated that someone currently aged 50 on median earnings, with median defined contribution pension assets, could lose between £3,800 and £5,800 from their pension savings by 2030 under the shock and severe shock scenarios, respectively.

Based on current annuity rates, that would mean pensioners losing retirement income of between £223 and £335 per year, compared with remaining in the EU.

But former work and pensions secretary Iain Duncan Smith, who supports Brexit, said: “I don’t accept there will be a short-term shock to the UK economy if we leave the EU. When Britain left the European exchange rate mechanism in 1992, instead of being a shock, it was a huge rise in income, and pensions did very well as a result.”

Duncan Smith warned of “two big threats of remaining in the EU” for pensions.

“They postponed the solvency directive [Solvency II], but it will come back again, and it is estimated their plans will cost UK pensions £400bn,” he said.

“Secondly, and even bigger, is the harmonisation directive, which will really do damage.”

He also warned that both these directives would be approved under qualified majority voting, so that the UK alone could not stop them.