To arrive at the Short Term Capital Gains the following calculation should be done:
Short Term Capital Gain = Total Sale Price of the Asset – [Cost of acquisition + Expenses Directly to Sale + Cost of improvements (if any)] –  Exemptions under Section 54
When it comes to Long Term Capital Assets, the only difference is that one is allowed to deduct Indexed Cost of Acquisition/Indexed Cost of Improvements from the sale price. CII (cost inflation index) is used for indexation. Since inflation affects the purchase price, this will increase your cost base (and lower your gains).