You can do a lot with VBScript to calclulate just about anything you want. So it should be possible.
Your question doesn't really tell me what the formula is or what you need to do, so I cannot answer more specifically.
I can use an example from my own testing:
Our application allows users to order merchandise. They pick items from a list, enter a quantity for each, select a shipping method, and enter their shipping address. Our application then multiplies the cost of each time times the quantity, totals the cost of all items, adds a shipping charge (from a table), and calculates sales tax based on the shipping address, then adds the tax to get a total cost for the order.
The application does all that math and displays the order total in the "Balance Due" field.
I reproduce all the same calculations in my QTP script (including SQL calls to get the shipping cost and tax percentage from our database) and I store my total in a variable. I then compare my variable to the amount in the Balance Due field to make sure it is the same.
"The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"
Thanks for your reply. But, In our application same formula uses for morethan one field. For example, minimum value in a column, 25th percentile and so on. several fields uses these calculations and display the results. So can we use QTP for checking these formulas?