Eight were in seats held by the governing Labour party, three by the Conservatives, one by the Liberal Democrats, one by an independent and one by the speaker.
Eight by-elections were won by the incumbent party, including in Haltemprice and Howden where Conservative David Davis resigned to recontest his seat.
At the dissolution of Parliament in 2010 there were three vacancies: North West Leicestershire and Middlesbrough South and East Cleveland, caused by the death of their respective Labour members David Taylor and Ashok Kumar; and Strangford caused by the resignation of the DUP's Iris Robinson.
Middlesbrough South and East Cleveland and Strangford were held by Tom Blenkinsop and Jim Shannon respectively, but North West Leicestershire was won by Conservative Andrew Bridgen.
The Conservatives lost all eight seats in the by-elections - four to the Liberal Democrats, three to Labour and one to the SNP.
20 by-elections were a result of the death of the incumbent MP - 11 Labour MPs died, along with eight Conservatives and Ulster Unionist Harold McCusker.
The Ulster Unionists lost one seat to the Social Democratic and Labour Party.
11 by-elections were the result of the death of the incumbent MP; seven were Conservatives, three Labour and one Liberal.
Meanwhile, the seat of Fermanagh and South Tyrone was won from the Independent Republican Party by Anti H-Block, a branch of Sinn Féin.
15 by-elections were a result of the death of the incumbent MP; six were Conservatives, six Labour, and the others were the Ulster Unionist Robert Bradford, the Independent Republican Frank Maguire and the Anti H-Block member Bobby Sands (who was in prison).