You can get realtime transaction fees calculated for you on the Bitcoin Fees website. If you are interested in how those numbers are calculated, read below.
First, when we quote a "Bitcoin transaction fee", we will usually quote one of two numbers:
- Consumers care about the total fee. This is the total fee that you're paying in a transaction, such as 10,000 satoshis or 0.0001 bitcoins. This is probably the most important number for consumers as they only care about the fees associated with their particular transaction.
- Miners care about the fee per byte (or kilobyte). This is the total fee divided by the number of bytes in a transaction, such as 40 satoshis/byte or 0.0004 bitcoins/kilobyte. This is the most important measurement for miners. The reason is that they use this to decide whether to include your transaction in the blocks they attempt to produce, as they can only include about 1 million bytes of transactions in their blocks. As such, they prefer to include transactions that pay more fee per byte.
It's important to note that the total bitcoin amount of your transaction doesn't matter for the purposes of fee calculation! For example, if your transaction is 250 bytes, you'll have to pay the same fee whether you're transferring 0.001 bitcoins or 1 million bitcoins.
For a transaction that you've already sent, you'll find either one of the numbers above or both numbers above on a block explorer. For transactions you haven't sent yet, you probably want to find the best fee-per-byte to ensure your transaction confirms quickly.
To find the ideal fee-per-byte, you need to know the size of your transaction in bytes. Unfortunately, many wallets don't tell you how many bytes will be in your transaction before you send it, so bitcoinfees.earn.com provides a useful statistic: the median byte size of a transaction. (The median is the most commonly seen byte size of transactions in the last several blocks.)
Also provided in the same part of the page is a recommended fee for fast confirmation. If you multiply these two values together, you'll get the total fee to pay. For example, if the recommended fee is 110 satoshis/byte and the median byte size is 226 bytes, that's 226 * 110 = 24860 -- which is displayed on the page for your convenience.
The number displayed on bitcoinfees.earn.com is in satoshis, but some software displays fees in bitcoins. To convert between the two, you can divided the satoshi value by 100 million (100,000,000 or 1e8 on a scientific calculator).
Warning: be careful, as some wallets only let you enter the number of satoshis/byte or bitcoins/kilobyte. If you enter the fixed fee described above into a per-byte field, you'll probably pay more than 200 times more fee than necessary. Instead enter the bitcoinfees.21.co recommended number of satoshis/byte (for wallets that use satoshis) or divide the recommended number of satoshis/byte by 100,000 to get the recommended number of bitcoins/kilobyte (for example, 110 / 100000 = 0.0011).