Launch Script Editor (Launchpad : Other : Script Editor). Copy and paste the following AppleScript into it. Click the hammer icon (compile), and then the ▸ button to run it. Save your script as File format: Text, and then option+File menu : Save As to any of Format (script, script bundle, or Application) to your Desktop. A double-click will run it.
try
display dialog "Total sheet height" default answer ""
set A to text returned of result
display dialog "Total job height" default answer ""
set B to text returned of result
on error errmsgnumbererrnbr
my error_handler(errnbr, errmsg)
return
end try
ignoring numeric strings
set answer to (A - B) / 2
end ignoring
display dialog "Your result is " & answer as text
return
on error_handler(nbr, msg)
display alert "[ " & nbr & " ] " & msgascriticalgiving up after 10
return
end error_handler
tr