You can't do it in a template unless you figure a way to make it work in the if conditional, but its not supposed to be there
Best bet would be to make a plugin in one of the postbit hooks, postbit_display_complete? I think or something, can't remember off the top of my head.
EDIT: Whoops forgot to refresh.
You can try maybe:
PHP Code:
$percentage = (intval($post['field7']) / intval($post['field6'])) * 100;