Transaction costs are  incurred by a trader during buying and selling  a security. These costs are on top of the price of the security that is being bought or sold.Depending on the type of the security, transaction costs can include broker/ commission fee, bid-offer spread, market impact cost, currency exchange fee, stamp duty and other types of taxes. 

A trader should take into account below additional costs before getting into a buy/ sell trade.

1 Commission or Brokerage Fees

A commission or brokerage fee is the fee paid by a trader to the broker for buying and selling securities  on his behalf. It is calculated as a percentage of the total transaction value. 
Commission usually covers expenses for the broker such as transaction fees paid to the stock exchange, order-handling fees. This varies from broker to broker.  Some brokers offer zero commission traders. 

2 Bid-Ask Spread

The bid-offer spread is the difference between the prices a trader is ready to buy a security  and the price at which the broker  is ready to sell that security.
The size of the spread reflects the liquidity position of the stock, as less liquid stocks will tend to have high bid-ask spread. Therefore, under competitive conditions the bid-ask spread measures the cost of making a trade without delay.
Typical bid-offer spreads in large liquidity stocks are about 0.5-1.0%.

Market Impact:

When people buy and sell a security, it adds new information to the market which has an impact on the market price of security. If all other factors remain the same, buying stocks will increase their market price. This is basically market impact. 
So, in case of a very large trade, where a security is  illiquid, the price at which the trade is executed will be higher than the indicated price. 

Practice Transaction Costs – Beginner

Practice Transaction Costs – Intermediate