I have custom fields contain value inside, for example cost, I want to build a View to list out of selected post and sum up the value from the custom field and then display as total on page.
Can Toolset able to do or I have to do with PHP global variables?
Toolset doesn't include any feature that you can use for calculations, and you'll need to use custom code for that.
How you do that depends on whether you want to add up values from fields belonging to the same post, or you want to calculate a sum across a number of posts.
You might find these couple of code samples helpful (even if they are not specifically the same case):
hidden link hidden link
(That site has some code formatting issues, but you can hopefully understand the examples.)