Sometimes a great idea strikes you in the most unexpected of moments.

For Brad Lovett the idea that came to him while sitting on a toilet has just earned him $30,000. He came up with the concept of Green Loos while using a particularly unsavoury conventional one on a South Island construction site last year.

"The unit hadn't been emptied for a week and with the summer heat, the smell was at its height," he said.

The University of Auckland Business School student and teammates Angus Blair and Lucy Luo developed a business plan and built a working prototype for their composting portable toilet that took out the top prize in the SPARK $100k challenge on Thursday.

The challenge is an annual entrepreneurship competition run for students and staff of the University of Auckland in partnership with The Icehouse business incubator.

The winning team receives $20,000 worth of seed capital and $10,00 worth of mentoring time at The Icehouse.

Lovett said the prize money would be used to develop the moulds for their first mass-produced Green Loos, and to help protect their intellectual property.

The Green Loo works by composting the waste so it doesn't smell.

"We are not adding any harmful chemicals, so it's a completely natural process that we are utilising in a very novel way that no one has done before," he said.

The team developed a good relationship with Mainzeal Construction during the testing of their prototype, with an average of 22 of its builders a day using the Green Loo for two weeks - double the capacity a normal portable toilet can take.

"It was the only unit they had on site for two weeks, when I took it away the site manager was begging me to bring it back, he said the workers hated using the other one."

Lovett said Mainzeal was keen to have Green Loos on all of their construction sites if the team could create a mass produced model that worked.

The Green Loos team are using the same composting technology to take advantage of an upcoming law change for septic tanks.

The law change will have the effect of creating higher standards for effluent quality.

"Around 40,000 septic tanks nationwide will be made redundant by this new law and at the moment the only [replacement] options range from between $7000 and $20,000," Lovett said.

"I have made a prototype out at Botany at my parents' place that considerably improves the effluent and it cost me a thousand dollars to build."

SPARK $100k chief judge Duncan Ledwith said the Green Loos team had a winning combination.

"Great team, great founder - he just gets it and then there is a very smart, articulate sales guy and then making up the three is a very switched on financial person as well.

"That is a dream team, you just don't often get that to be honest," he said.

Ledwith said the septic tank law change was a particularly important development for Green Loos.

"For any company to succeed or sell you want a compelling event of some kind.

"Once the new law around septic tanks comes in, people will need to buy a product like theirs, so it's like a forcing function which is great."

Lovett reiterated the septic tank market was not one to turn your nose up at.

"With the coming law change there is a $400 million to $1 billion gap in the market that we can fill - and that's just New Zealand."