if you hit the "back" button it usually tends to stick, what you can do is when the form is submitted clear the element then before it goes to the next page but after doing with the element what you need to.
$('#shares').keyup(function(){
payment = 0;
calcTotal();
gtotal = ($('#shares').val() * 1) + payment;
gtotal = gtotal.toFixed(2);
$('#shares').val('');
$("p.total").html("Total Payment: <strong>" + gtotal + "</strong>");
});