there is nothing wrong with this piece of code...
i just uploaded and tested it, with $total=123; at beginig (cause i dont have your original form)..
it showed:
the nett price was 123
the gross price including VAT is £144.525
what do you see when you run this code?
the nett price was 123
the gross price including VAT is £0
or
the gross price including VAT is £
??
remember that $total must be a number, and if it is a string, the first character must be a number.
if $total is something like '$123,99', the function will return 0, cause the sign '$' is not a number.