How to do simple subtraction in Computed Field?
As per the documentation of computation field module to calculate the difference of two fields you need to use the PEAR:

$path = '/pathToPearsParentDirectory/pear/PEAR';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);

require_once 'PEAR.php'; 
include_once "Text/Diff.php"; 
include_once "Text/Diff/Renderer.php"; 
include_once "Text/Diff/Renderer/inline.php";

$diff = &amp;new Text_Diff('auto', array(array($node-&gt;field_nameOfOneFieldToCompare[0]['value']), array($node-&gt;field_nameOfOtherFieldToCompare[0]['value']))); $renderer
= &amp;new Text_Diff_Renderer_inline();

$node_field[0]['value'] = $renderer-&gt;render($diff);


More info about it available here http://arencambre.com/blog/2009/05/17/how-i-got-field-diffs-working-with-drupal-pear-text_diff-and-dreamhost