How best to implement a custom variable in the content creation form in D7?
I believe your best bet is to create your own module, with a custom form hook and the form submit which will process your data and do all your calculations and save the new value. The form tutorials in the Form API Examples can give you a lot of good insight how to do this.