I want know how to calculate the values in views from existing fields by adding views php, or I have to use views api or by creating templates.Which approach will be best for this?
If you want simple math calculations, then I would look at views calc. Views PHP has some great uses for quick testing, but it is generally assumed that if you need Views PHP you should write your own module. You can also get a good discussion on this issue at: https://www.drupal.org/node/1219356.