$('.price').blur(function () { var sum = 0; $('.price').each(function() { sum += Number($(this).val()); }); // here, you have your sum });