OK I'm a noob - just want to calculate field values

OK I'm a noob - just want to calculate field values

Hi All

I'd like to use JQuery to calculate and validate various form fields values based on another (as they are entered).

e.g The user enters a value in a GrandTotal field.
The user then enters values in other fields that together must total the GrandTotal field otherwise an error message is displayed.

any ideas on the simplest method to enable this??

thanks in advance