Nose si es algo como esto lo que precisas.
Código:
<html>
<body>
<script language="javascript">
function sumar(){
var text1 = document.getElementById('text1').value * 1;
var text2 = document.getElementById('text2').value * 1;
var text3 = document.getElementById('text3').value * 1;
var text4 = document.getElementById('text4').value * 1;
var text5 = document.getElementById('text5').value * 1;
var texttotal1 = text1 + text2;
var texttotal2 = text3 + text4 + text5;
document.getElementById('texttotal1').value = texttotal1;
document.getElementById('texttotal2').value = texttotal2;
}
</script>
<table>
<tr>
<td><input type="text" name="text1" id="text1" value="4"></td>
<td><input type="text" name="text2" id="text2" value="5">=</td>
<td><input type="text" name="texttotal1" id="texttotal1" value=""></td>
</tr>
<tr>
<td><input type="text" name="text3" id="text3" value="6"></td>
</tr>
<tr>
<td><input type="text" name="text4" id="text4" value="7"></td>
</tr>
<tr>
<td><input type="text" name="text5" id="text5" value="4"></td>
</tr>
<tr><td>=</td></tr>
<tr>
<td><input type="text" name="texttotal2" id="texttotal2" value=""></td>
<td> </td>
<td><input type="button" onclick="javascript:sumar();" value = "sumar"></td>
</tr>
</table>
</body>
</html>
SI no lo es, intenta expresarte mejor. Saludos