The transaction cost is calculated on the basis of gas and gas price. The formula is -
From the documentation -
The way the fee works is as follows. Every transaction must contain,
alongside its other data, a GASPRICE and STARTGAS value. STARTGAS is
the amount of "gas" that the transaction assigns itself, and GASPRICE
is the fee that the transaction pays per unit of gas; thus, when a
transaction is sent, the first thing that is done during evaluation is
subtracting STARTGAS * GASPRICE wei plus the transaction's value from
the sending account balance. GASPRICE is set by the transaction
sender, but miners will likely refuse to process transactions whose
GASPRICE is too low.
Take a look at this question to understand the concept of Gas.
So you may end up losing extra amount once your transaction is completed because of the transaction fee. You can decrease the GAS value to lower the transaction fee but in that case, miner may give low priority to your transation and that will delay transaction completion.