<!DOCTYPE html>
<html>
<head></head>
<body>
<form id="form">
<input id="price" type="text" value="1" />
<input id="markup" type="text" value="2" />
<input id="out" type="text" />
</form>
<script>
var f = document.getElementById('form');
f.onchange = f.onkeyup = function() {
var first = +document.getElementById('price').value;
var second = +document.getElementById('markup').value;
document.getElementById('out').value = first + second || 'нужны числа';
}
</script>
</body>
</html>