Javascript newbie here. I built a total cost of ownership calculator to calculate the cost of a business over 5 years. It has a lot of repeating script and prob way more congested than it needs to be so I was wondering if y'all could give me an idea of how I could go about writing this in a more DRY way. Below is a live demo snippet of a portion of the calculator.
/* Totals */
(function() {
$('#1sfa1, #1sfa2, #1sfa3, #2sfa1, #2sfa2, #2sfa3, #3sfa1, #3sfa2, #3sfa3, #4sfa1, #4sfa2, #4sfa3, #5sfa1, #5sfa2, #5sfa3, #1sfm1, #1sfm2, #1sfm3, #2sfm1, #2sfm2, #2sfm3, #3sfm1, #3sfm2, #3sfm3, #4sfm1, #4sfm2, #4sfm3, #5sfm1, #5sfm2, #5sfm3, #1hcc1, #1hcq1, #1hcc2, #1hcq2, #1hcc3, #1hcq3, #1hcc4, #1hcq4, #1hcc5, #2hcq5, #2hcc1, #2hcq1, #2hcc2, #2hcq2, #2hcc3, #2hcq3, #2hcc4, #2hcq4, #2hcc5, #2hcq5, #3hcc1, #3hcq1, #3hcc2, #3hcq2, #3hcc3, #3hcq3, #3hcc4, #3hcq4, #3hcc5, #3hcq5, #4hcc1, #4hcq1, #4hcc2, #4hcq2, #4hcc3, #4hcq3, #4hcc4, #4hcq4, #4hcc5, #4hcq5, #5hcc1, #5hcq1, #5hcc2, #5hcq2, #5hcc3, #5hcq3, #5hcc4, #5hcq4, #5hcc5, #5hcq5, #1hc1, #1hc2, #1hc3, #1hc4, #1hc5, #2hc1, #2hc2, #2hc3, #2hc4, #2hc5, #3hc1, #3hc2, #3hc3, #3hc4, #3hc5, #4hc1, #4hc2, #4hc3, #4hc4, #4hc5, #5hc1, #5hc2, #5hc3, #5hc4, #5hc5').on('change keyup input', function() {
/* ------- Subscription Fees ------- */
sf1 = parseFloat($('#1sfa1').val()) + parseFloat($('#1sfa2').val()) + parseFloat($('#1sfa3').val());
sf2 = parseFloat($('#2sfa1').val()) + parseFloat($('#2sfa2').val()) + parseFloat($('#2sfa3').val());
sf3 = parseFloat($('#3sfa1').val()) + parseFloat($('#3sfa2').val()) + parseFloat($('#3sfa3').val());
sf4 = parseFloat($('#4sfa1').val()) + parseFloat($('#4sfa2').val()) + parseFloat($('#4sfa3').val());
sf5 = parseFloat($('#5sfa1').val()) + parseFloat($('#5sfa2').val()) + parseFloat($('#5sfa3').val());
$('#sfTotal1').val(parseFloat(sf1).toFixed(2));
$('#sfTotal2').val(parseFloat(sf2).toFixed(2));
$('#sfTotal3').val(parseFloat(sf3).toFixed(2));
$('#sfTotal4').val(parseFloat(sf4).toFixed(2));
$('#sfTotal5').val(parseFloat(sf5).toFixed(2));
/* ------- Hardware Costs ------- */
hc1 = parseFloat($('#1hc1').val()) + parseFloat($('#1hc2').val()) + parseFloat($('#1hc3').val()) + parseFloat($('#1hc4').val());
hc2 = parseFloat($('#2hc1').val()) + parseFloat($('#2hc2').val()) + parseFloat($('#2hc3').val()) + parseFloat($('#2hc4').val());
hc3 = parseFloat($('#3hc1').val()) + parseFloat($('#3hc2').val()) + parseFloat($('#3hc3').val()) + parseFloat($('#3hc4').val());
hc4 = parseFloat($('#4hc1').val()) + parseFloat($('#4hc2').val()) + parseFloat($('#4hc3').val()) + parseFloat($('#4hc4').val());
hc5 = parseFloat($('#5hc1').val()) + parseFloat($('#5hc2').val()) + parseFloat($('#5hc3').val()) + parseFloat($('#5hc4').val());
$('#hcTotal1').val(parseFloat(hc1).toFixed(2));
$('#hcTotal2').val(parseFloat(hc2).toFixed(2));
$('#hcTotal3').val(parseFloat(hc3).toFixed(2));
$('#hcTotal4').val(parseFloat(hc4).toFixed(2));
$('#hcTotal5').val(parseFloat(hc5).toFixed(2));
});
/* ------- Subscription Fees ------- */
$('#1sfm1, #1sfm2, #1sfm3, #2sfm1, #2sfm2, #2sfm3, #3sfm1, #3sfm2, #3sfm3, #4sfm1, #4sfm2, #4sfm3, #5sfm1, #5sfm2, #5sfm3').on('input', function() {
$('#1sfa1').val(parseFloat($('#1sfm1').val() * 12));
$('#1sfa2').val(parseFloat($('#1sfm2').val() * 12));
$('#1sfa3').val(parseFloat($('#1sfm3').val() * 12));
$('#2sfa1').val(parseFloat($('#2sfm1').val() * 12));
$('#2sfa2').val(parseFloat($('#2sfm2').val() * 12));
$('#2sfa3').val(parseFloat($('#2sfm3').val() * 12));
$('#3sfa1').val(parseFloat($('#3sfm1').val() * 12));
$('#3sfa2').val(parseFloat($('#3sfm2').val() * 12));
$('#3sfa3').val(parseFloat($('#3sfm3').val() * 12));
$('#4sfa1').val(parseFloat($('#4sfm1').val() * 12));
$('#4sfa2').val(parseFloat($('#4sfm2').val() * 12));
$('#4sfa3').val(parseFloat($('#4sfm3').val() * 12));
$('#5sfa1').val(parseFloat($('#5sfm1').val() * 12));
$('#5sfa2').val(parseFloat($('#5sfm2').val() * 12));
return $('#5sfa3').val(parseFloat($('#5sfm3').val() * 12));
});
$('#1sfa1, #1sfa2, #1sfa3, #2sfa1, #2sfa2, #2sfa3, #3sfa1, #3sfa2, #3sfa3, #4sfa1, #4sfa2, #4sfa3, #5sfa1, #5sfa2, #5sfa3').on('input', function() {
$('#1sfm1').val(parseFloat($('#1sfa1').val() / 12));
$('#1sfm2').val(parseFloat($('#1sfa2').val() / 12));
$('#1sfm3').val(parseFloat($('#1sfa3').val() / 12));
$('#2sfm1').val(parseFloat($('#2sfa1').val() / 12));
$('#2sfm2').val(parseFloat($('#2sfa2').val() / 12));
$('#2sfm3').val(parseFloat($('#2sfa3').val() / 12));
$('#3sfm1').val(parseFloat($('#3sfa1').val() / 12));
$('#3sfm2').val(parseFloat($('#3sfa2').val() / 12));
$('#3sfm3').val(parseFloat($('#3sfa3').val() / 12));
$('#4sfm1').val(parseFloat($('#4sfa1').val() / 12));
$('#4sfm2').val(parseFloat($('#4sfa2').val() / 12));
$('#4sfm3').val(parseFloat($('#4sfa3').val() / 12));
$('#5sfm1').val(parseFloat($('#5sfa1').val() / 12));
$('#5sfm2').val(parseFloat($('#5sfa2').val() / 12));
return $('#5sfm3').val(parseFloat($('#5sfa3').val() / 12));
});
/* ------- Hardware Costs ------- */
$('#1hcc1, #1hcq1, #1hcc2, #1hcq2, #1hcc3, #1hcq3, #1hcc4, #1hcq4, #1hcc5, #2hcq5, #2hcc1, #2hcq1, #2hcc2, #2hcq2, #2hcc3, #2hcq3, #2hcc4, #2hcq4, #2hcc5, #2hcq5, #3hcc1, #3hcq1, #3hcc2, #3hcq2, #3hcc3, #3hcq3, #3hcc4, #3hcq4, #3hcc5, #3hcq5, #4hcc1, #4hcq1, #4hcc2, #4hcq2, #4hcc3, #4hcq3, #4hcc4, #4hcq4, #4hcc5, #4hcq5, #5hcc1, #5hcq1, #5hcc2, #5hcq2, #5hcc3, #5hcq3, #5hcc4, #5hcq4, #5hcc5, #5hcq5').on('input', function() {
$('#1hc1').val(parseFloat($('#1hcc1').val()) * (parseFloat($('#1hcq1').val())));
$('#1hc2').val(parseFloat($('#1hcc2').val()) * (parseFloat($('#1hcq2').val())));
$('#1hc3').val(parseFloat($('#1hcc3').val()) * (parseFloat($('#1hcq3').val())));
$('#1hc4').val(parseFloat($('#1hcc4').val()) * (parseFloat($('#1hcq4').val())));
$('#1hc5').val(parseFloat($('#1hcc5').val()) * (parseFloat($('#1hcq5').val())));
$('#2hc1').val(parseFloat($('#2hcc1').val()) * (parseFloat($('#2hcq1').val())));
$('#2hc2').val(parseFloat($('#2hcc2').val()) * (parseFloat($('#2hcq2').val())));
$('#2hc3').val(parseFloat($('#2hcc3').val()) * (parseFloat($('#2hcq3').val())));
$('#2hc4').val(parseFloat($('#2hcc4').val()) * (parseFloat($('#2hcq4').val())));
$('#2hc5').val(parseFloat($('#2hcc5').val()) * (parseFloat($('#2hcq5').val())));
$('#3hc1').val(parseFloat($('#3hcc1').val()) * (parseFloat($('#3hcq1').val())));
$('#3hc2').val(parseFloat($('#3hcc2').val()) * (parseFloat($('#3hcq2').val())));
$('#3hc3').val(parseFloat($('#3hcc3').val()) * (parseFloat($('#3hcq3').val())));
$('#3hc4').val(parseFloat($('#3hcc4').val()) * (parseFloat($('#3hcq4').val())));
$('#3hc5').val(parseFloat($('#3hcc5').val()) * (parseFloat($('#3hcq5').val())));
$('#4hc1').val(parseFloat($('#4hcc1').val()) * (parseFloat($('#4hcq1').val())));
$('#4hc2').val(parseFloat($('#4hcc2').val()) * (parseFloat($('#4hcq2').val())));
$('#4hc3').val(parseFloat($('#4hcc3').val()) * (parseFloat($('#4hcq3').val())));
$('#4hc4').val(parseFloat($('#4hcc4').val()) * (parseFloat($('#4hcq4').val())));
$('#4hc5').val(parseFloat($('#4hcc5').val()) * (parseFloat($('#4hcq5').val())));
$('#5hc1').val(parseFloat($('#5hcc1').val()) * (parseFloat($('#5hcq1').val())));
$('#5hc2').val(parseFloat($('#5hcc2').val()) * (parseFloat($('#5hcq2').val())));
$('#5hc3').val(parseFloat($('#5hcc3').val()) * (parseFloat($('#5hcq3').val())));
$('#5hc4').val(parseFloat($('#5hcc4').val()) * (parseFloat($('#5hcq4').val())));
return $('#5hc5').val(parseFloat($('#5hcc5').val()) * (parseFloat($('#5hcq5').val())));
});
/* ------- Total ------- */
total = parseFloat(t1 + t2 + t3 + t4 + t5).toFixed(2);
return $('#TotalCost').val(total);
}).call(this);
<!DOCTYPE html>
<html lang="en">
<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" media="all">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
</head>
<body>
<div class="container-fluid">
<form id="msform">
<fieldset id="table-two" class="table container-fluid">
<div class="year1">
<div class="row">
<div class="col-xs-12">
<h2 class="fs-title">Subscription Fees</h2>
</div>
</div>
<div id="head2" class="head">
<div class="container-fluid">
<div class="row">
<div class="col-sm-offset-6 col-sm-2 col-xs-offset-3 col-xs-3">
<h3>Monthly Fee</h3>
</div>
<div class="col-sm-offset-2 col-sm-2 col-xs-offset-3 col-xs-3">
<h3>Annual Spend</h3>
</div>
</div>
</div>
</div>
<h4>Year 1</h4>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>1st Doctor</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="1sfm1" name="1sfm1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<p>x12 mo</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="1sfa1" name="1sfa1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>2nd Doctor</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="1sfm2" name="1sfm2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<p>x12 mo</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="1sfa2" name="1sfa2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>3rd Doctor</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="1sfm3" name="1sfm3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<p>x12 mo</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="1sfa3" name="1sfm4" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
</div>
<div class="year2">
<h4>Year 2</h4>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>1st Doctor</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="2sfm1" name="2sfm1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<p>x12 mo</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="2sfa1" name="2sfa1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>2nd Doctor</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="2sfm2" name="2sfm2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<p>x12 mo</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="2sfa2" name="2sfa2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>3rd Doctor</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="2sfm3" name="2sfm3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<p>x12 mo</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="2sfa3" name="2sfa3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
</div>
<div class="year3">
<h4>Year 3</h4>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>1st Doctor</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="3sfm1" name="3sfm1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<p>x12 mo</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="3sfa1" name="3sfa1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>2nd Doctor</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="3sfm2" name="3sfm2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<p>x12 mo</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="3sfa2" name="3sfa2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>3rd Doctor</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="3sfm3" name="3sfm3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<p>x12 mo</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="3sfa3" name="3sfa3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
</div>
<div class="year4">
<h4>Year 4</h4>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>1st Doctor</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="4sfm1" name="5sfm1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<p>x12 mo</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="4sfa1" name="4sfa1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>2nd Doctor</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="4sfm2" name="4sfm2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<p>x12 mo</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="4sfa2" name="4sfa2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>3rd Doctor</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="4sfm3" name="4sfm3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<p>x12 mo</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="4sfa3" name="4sfa3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
</div>
<div class="year5">
<h4>Year 5</h4>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>1st Doctor</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="5sfm1" name="5sfm1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<p>x12 mo</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="5sfa1" name="5sfa1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>2nd Doctor</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="5sfm2" name="5sfm2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<p>x12 mo</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="5sfa2" name="5sfa2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>3rd Doctor</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="5sfm3" name="5sfm3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<p>x12 mo</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="5sfa3" name="5sfa3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
</div>
</fieldset>
<fieldset id="table-three" class="table container-fluid">
<div class="year1">
<div class="row">
<div class="col-xs-12">
<h2>Hardware Costs</h2>
</div>
</div>
<div id="head3" class="head">
<div class="container-fluid">
<div class="col-md-offset-6 col-sm-2 col-xs-1 col-xs-offset-6">
<h3>Cost/Device</h3>
</div>
<div class="col-sm-2 col-xs-1">
<h3>Quantity</h3>
</div>
<div class="col-sm-2 col-xs-1">
<h3>Annual Spend</h3>
</div>
</div>
</div>
<h4>Year 1</h4>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>Computers/Laptops</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="1hcc1" name="1hcc1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="1hcq1" name="1hcq1" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="1hc1" name="1hc1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>iPads</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="1hcc2" name="1hcc2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="1hcq2" name="1hcq2" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="1hc2" name="1hc2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>Android Tablets</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="1hcc3" name="1hcc3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="1hcq3" name="1hcq3" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="1hc3" name="1hc3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>Servers</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="1hcc4" name="1hcc4" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="1hcq4" name="1hcq4" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="1hc4" name="1hc4" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
</div>
<div class="year2">
<h4>Year 2</h4>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>Computers/Laptops</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="2hcc1" name="2hcc1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="2hcq1" name="2hcq1" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="2hc1" name="2hc1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>iPads</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="2hcc2" name="2hcc2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="2hcq2" name="2hcq2" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="2hc2" name="2hc2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>Android Tablets</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="2hcc3" name="2hcc3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="2hcq3" name="2hcq3" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="2hc3" name="2hc3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>Servers</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="2hcc4" name="2hcc4" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="2hcq4" name="2hcq4" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="2hc4" name="2hc4" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
</div>
<div class="year3">
<h4>Year 3</h4>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>Computers/Laptops</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="3hcc1" name="3hcc1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="3hcq1" name="3hcq1" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="3hc1" name="3hc1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>iPads</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="3hcc2" name="3hcc2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="3hcq2" name="3hcq2" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="3hc2" name="3hc2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>Android Tablets</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="3hcc3" name="3hcc3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="3hcq3" name="3hcq3" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="3hc3" name="3hc3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>Servers</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="3hcc4" name="3hcc4" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="3hcq4" name="3hcq4" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="3hc4" name="3hc4" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
</div>
<div class="year4">
<h4>Year 4</h4>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>Computers/Laptops</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="4hcc1" name="4hcc1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="4hcq1" name="4hcq1" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="4hc1" name="4hc1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>iPads</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="4hcc2" name="4hcc2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="4hcq2" name="4hcq2" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="4hc2" name="4hc2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>Android Tablets</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="4hcc3" name="4hcc3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="4hcq3" name="4hcq3" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="4hc3" name="4hc3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>Servers</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="4hcc4" name="4hcc4" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="4hcq4" name="4hcq4" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="4hc4" name="4hc4" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
</div>
<div class="year5">
<h4>Year 5</h4>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>Computers/Laptops</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="5hcc1" name="5hcc1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="5hcq1" name="5hcq1" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="5hc1" name="5hc1" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>iPads</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="5hcc2" name="5hcc2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="5hcq2" name="5hcq2" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="5hc2" name="5hc2" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>Android Tablets</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="5hcc3" name="5hcc3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="5hcq3" name="5hcq3" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="5hc3" name="5hc3" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-3">
<p>Servers</p>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="5hcc4" name="5hcc4" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">x</span>
<input type="number" id="5hcq4" name="5hcq4" step="1" value="0" placeholder="0" class="form-control">
</div>
</div>
<div class="col-sm-2 col-xs-3">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="5hc4" name="5hc4" step="0.01" value="0.00" placeholder="0.00" class="form-control">
</div>
</div>
</div>
</div>
</fieldset>
<fieldset id="table-seven" class="table container-fluid">
<div class="row">
<div class="col-xs-offset-2 col-xs-2">
<h3>Year 1</h3>
</div>
<div class="col-xs-2">
<h3>Year 2</h3>
</div>
<div class="col-xs-2">
<h3>Year 3</h3>
</div>
<div class="col-xs-2">
<h3>Year 4</h3>
</div>
<div class="col-xs-2">
<h3>Year 5</h3>
</div>
</div>
<div class="row">
<div class="col-xs-2">
<p>Subscription Fees</p>
</div>
<div class="col-xs-2">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="sfTotal1" name="sfTotal1" value="0.00" placeholder="0.00" readonly class="form-control">
</div>
</div>
<div class="col-xs-2">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="sfTotal2" name="sfTotal2" value="0.00" placeholder="0.00" readonly class="form-control">
</div>
</div>
<div class="col-xs-2">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="sfTotal3" name="sfTotal3" value="0.00" placeholder="0.00" readonly class="form-control">
</div>
</div>
<div class="col-xs-2">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="sfTotal4" name="sfTotal4" value="0.00" placeholder="0.00" readonly class="form-control">
</div>
</div>
<div class="col-xs-2">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="sfTotal5" name="sfTotal5" value="0.00" placeholder="0.00" readonly class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-2">
<p>Hardware Costs</p>
</div>
<div class="col-xs-2">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="hcTotal1" name="hcTotal1" value="0.00" placeholder="0.00" readonly class="form-control">
</div>
</div>
<div class="col-xs-2">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="hcTotal2" name="hcTotal2" value="0.00" placeholder="0.00" readonly class="form-control">
</div>
</div>
<div class="col-xs-2">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="hcTotal3" name="hcTotal3" value="0.00" placeholder="0.00" readonly class="form-control">
</div>
</div>
<div class="col-xs-2">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="hcTotal4" name="hcTotal4" value="0.00" placeholder="0.00" readonly class="form-control">
</div>
</div>
<div class="col-xs-2">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="hcTotal5" name="hcTotal5" value="0.00" placeholder="0.00" readonly class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-offset-8 col-xs-2">
<p class="total">Total Cost of Ownership</p>
</div>
<div class="col-sm-2 col-xs-2">
<div class="input-group"><span class="input-group-addon">$</span>
<input type="number" id="TotalCost" name="TotalCost" value="0.00" placeholder="0.00" readonly class="form-control">
</div>
</div>
</div>
</fieldset>
</form>
</div>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="http://thecodeplayer.com/uploads/js/jquery.easing.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<!-- <script>$(document).ready(function(){$(".submit").click(function(a){a.preventDefault();var e=$("#msform").serializeArray();$.ajax({url:"send.php",type:"POST",data:e,cache:!1,success:function(a){$(".data").html(a)}})})});</script> -->
</html>