A Labor MP's bill to legalise same-sex marriage has been overwhelmingly defeated in the House of Representatives.

The result of the vote was 42-98.

Prime Minister Julia Gillard and Opposition Leader Tony Abbott sat on the same side of the chamber to vote against the private bill, proposed by Labor backbencher Stephen Jones.

Labor allowed its members a conscience vote on the issue - meaning they did not have to all vote in the same way - but the coalition did not.

The government's front bench was split on the vote, with Deputy Prime Minister Wayne Swan and cabinet minister Chris Bowen voting with the coalition to oppose the bill.