Tesco is to build 4,000 new homes in an attempt to make use of its vast undeveloped landbank with a £1bn construction programme.

The plan, announced weeks after the Guardian revealed that Tesco is hoarding land that could support 15,000 homes, is the biggest housebuilding project ever announced by the supermarket.

A Guardian investigation of Land Registry records found that the retailer was sitting on 310 sites that do not currently house a Tesco store.

Among the Tesco sites set for housing developments following Friday's announcement will be Welwyn Garden City, Hertfordshire, close to the retailer's operational headquarters, where it plans to build more than 700 homes on a site where it previously planned a store.

The trade journal Property Week said the majority of the sites will be in the south-east of England but developments are also scheduled further north, including in Liverpool and the west of England. Schemes include 80 houses and flats on the former Evershed printing works site in St Albans, Hertfordshire.

Tesco said it was likely to build homes itself via its development wing, Spenhill, while also selling sites to housing developers, in a programme that has been valued by Property Week at £1bn, based on a valuation of £250,000 per home.

A Tesco spokesperson said: "In response to changing customer shopping habits we have decided to reduce the amount of new store space we build each year, building fewer large stores. Where we no longer intend to develop sites, we sell them, lease them or develop them for housing.

"We are pleased to be bringing new investment to communities up and down the country and playing our part in meeting local housing needs over the coming years."

Last April Tesco boss Philip Clarke cut the value of about 460,000 sq m of its land by £800m as he admitted the company would have to sell off land where it had previously planned to build stores, store extensions and distribution centres. However, the company has been slow to act as the most ready buyers for much of its land stock are likely to have been rivals such as the fast-growing Aldi and Lidl chains.

Retail analysts said Tesco was now turning to housing developments because residential development was more economically viable. The poor performance of out-of-town supermarkets meant the land was not necessarily worth more if it was dedicated to new retail sites.

Clive Black, an analyst at Shore Capital, said Tesco was under pressure to act due to public and political demand for space to build housing, alongside calls from shareholders to recoup some of the value of the land.

"This is a silver lining on a very dark cloud," said Black. "Tesco is at least trying to maximise value after a high-profile profits writedown but it's not clear how much it will be able to claw back. It's a sensible move and better than building a Tesco store that's not economic or selling to the competition."

Tesco already has a policy of building homes above or beside its stores as part of efforts to gain planning permission. In London alone, Tesco was set to build more than 800 homes last year, close to 5% of all non-local authority homes being built in the capital. That included projects in Woolwich, Highams Green and Streatham, where Tesco built a total of 450 homes.

Other supermarkets are also developing housing, with at least 4,500 homes expected to be built by the major grocers between 2013 and 2018. J Sainsbury was set to begin projects involving more than 1,500 homes this year, including a partnership with Barratt on a major development in Battersea, south London, which includes 700 homes and a new tube station. Some developments are smaller in scale. Waitrose has developed a number of stores topped by flats, while many retailers are turning redundant pubs into convenience stores with housing above.