How transaction fees are calculated when buying from exchange and transferring to wallet? If I buy bitcoin from a exchange and later want to transfer to my wallet for storing purpose (e.g. Jaxx or other), how the transaction fee will be calculated? I thought I can buy some amount of BTC and transfer the equal amount of BTC to wallet. How this works?

Thanks
Whenever ownership of bitcoins is transferred by means of a transaction on the blockchain, this transaction takes up space in a block and therefore incurs a transaction fee. Essentially, each sender that requests confirmation of their transaction attaches a bid for blockchain space to their transaction which a miner can collect when they include the transaction in their block.

Since the Bitcoin exchange controls the funds when you withdraw to your own wallet, the Bitcoin exchange is the sender of the transaction and decides what fee to attach to the transaction. Additionally, a withdrawal from an exchange may incur a withdrawal fee depending on the specific exchange's policy. Please check the corresponding exchange's FAQ or user guidance for more information on their fee policies.