<!DOCTYPE html> <html lang ="pt-br"> <head> <meta charset ="UTF-8"> <title> Soma Checkbox</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script> </head> <body> <form action=""> <input type="checkbox" name="valor1" id="preco" value= 25.00>Ahu <br/> <input type="checkbox" name="valor2" id="preco" value= "36.00">Batel<br/> <input type="checkbox" name="valor3" id="preco" value= "44.00"> Bacacheri<br/> <input type="checkbox" name="valor4" id="preco" value= "120.00"> Alto XV<br/> <input type="text" name="resultado" id="result" value= "0.00"> </form> </body> <script> function somar() { var result = $("input:checked"); var total = 0; for (var i=0; i<result.length; i++) { total = total + parseFloat(result[i].value); } $("#result").val(total.toFixed(2)); } somar(); $(":checkbox").click(somar); </script> </html>