prueba esto, por último chequeando podras corregir tu error
Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Cálculo</title>
<script>
function calc(){
var a=document.getElementById("num1")
var b=document.getElementById("num2")
var c=document.getElementById("num3")
var d=document.getElementById("num4")
var e=document.getElementById("num5")
ereg=/\d$/ //sólo numeros
if(!a.value.match(ereg)) {alert("sólo numeros en a\"A\"");a.focus();return false}
if(!b.value.match(ereg)) {alert("sólo numeros en a\"B\"");b.focus();return false}
if(!c.value.match(ereg)) {alert("sólo numeros en a\"C\"");c.focus();return false}
if(!d.value.match(ereg)) {alert("sólo numeros en a\"D\"");d.focus();return false}
if(!e.value.match(ereg)) {alert("sólo numeros en a\"E\"");e.focus();return false}
formula1=a.value-b.value
formula1=formula1/7
formula2=c.value*1+d.value*1
formula2=formula2/5
var ress=(formula1-formula2)*e.value
document.getElementById("res").innerHTML=ress
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<p>Número A:
<input type="text" name="num1" id="num1" maxlength="4" size="10" />
<br />
Número B:
<input type="text" name="num2" id="num2" maxlength="4" size="10" />
<br />
Número C:
<input type="text" name="num3" id="num3" maxlength="4" size="10" />
<br />
Número D:
<input type="text" name="num4" id="num4" maxlength="4" size="10" />
<br />
Número E:
<input type="text" name="num5" id="num5" maxlength="4" size="10" />
</p>
<p>
<input type="button" name="c" id="c" value="Calcular" onclick="calc()" />
</p>
</form>
<div style="background-color:#FFFF80; margin-top:20px; width:300px; padding:10px">Fórmula: ((A-B)/7) - ((C+D)/5) * E<br />
Resultado: <span id="res" style="font-weight:bold">?</span>
</div>
</body>
</html>
salu2