Is there a formula to determine if the amount of hydrogen generated during electrolysis outweighs the cost?

Is there a mathematical formula to determine if the amount of hydrogen gas generated during electrolysis of water from a source of electricity is efficient and outweighs the energy used to produce the hydrogen gas? An example would be: If I used a 9 volt battery sustained for 60 seconds and produced 1ml of... show more Is there a mathematical formula to determine if the amount of hydrogen gas generated during electrolysis of water from a source of electricity is efficient and outweighs the energy used to produce the hydrogen gas?

An example would be: If I used a 9 volt battery sustained for 60 seconds and produced 1ml of hydrogen gas; did I acquire more energy than I used to produce the hydrogen?
6 answers 6