The Abbott government's failed attempt to return 157 asylum seekers to India cost taxpayers more than $12 million, as passengers were kept captive on the high seas for nearly a month before being brought to the Australian mainland.

A cost analysis by Fairfax Media has revealed as much as $12,020,778 was outlayed by the government to ensure the 157 Sri Lankan nationals did not arrive on Australian shores to challenge Immigration Minister Scott Morrison's resolve of "stopping the boats".

The Australian Customs and Border Protection vessel Ocean Protector waits on standby in Flying Fish Cove, Christmas Island. Credit:Wolter Peeters

The government has consistently claimed it will save $2.5 billion by stopping the boats, by shutting down nine onshore detention centres and dramatically reducing the number of asylum seekers arriving by boat.

The cost of keeping the asylum seekers at sea, based largely on Senate Estimates figures, includes the daily running cost of the navy frigate HMAS Perth which first intercepted the boat that had travelled from India, and the customs vessel Ocean Protector where the asylum seekers were kept on board for 29 days.