This short article will shed light on the basics of Bitcoin transaction fees, starting from how they are calculated to what you can do in case you got too big or too little of a fee.
Bitcoin transaction fees (or often also called mining fees) allow users to prioritize their transactions (or often also called as tx) over others and get included faster into Bitcoin’s blotter of transactions known as the blockchain.
Miners need to decide whether to include a transaction in the blockchain or not since the time spent carrying out this transaction matters. Lower fees usually mean that chances are this transaction will stuck for long. That is why miners look for the highest transaction fees since they may speed up the transaction process.
In short, that is what you have to know about Bitcoin fees in general. However, for proper understanding of the matter, I advise you to continue reading this article, where I will cover the following:
- What are Bitcoin transaction fees?
- How are Bitcoin Fees Calculated
- Calculating Tx Size
- Reducing Tx Fees
- How Wallets Deal with Fees
- Some more information
- The bottom line
1. What are Bitcoin Transaction Fees?
Bitcoin fees are no different from the transaction fees you have to pay at any other bank, no matter what currency you use (cryptocurrency or fiat currency, like USD). A Bitcoin fee is a fee that a Bitcoin owner has to transfer to a Bitcoin miner any time they transfer funds to another bitcoin address. First, let’s have a look at what happens in general when you send Bitcoins to another address:
- Every blockchain system has computers (sometimes referred to as nodes) that hold a copy of the Bitcoin blockchain. Each transaction has to go through a validation process by each one of these computers. What happens here is nodes are checking whether you really have the needed amount of Bitcoins on your balance by going through your Bitcoin’s transaction history.
- If the transaction is valid, it goes into the Mempool (short for Memory Pool). You can imagine Memory Pool as a “waiting room” where the transaction spends some time before a miner picks it up and packs it into a block of transactions just as you sit and wait at the doctor’s till your name is called out. Here, the tx is considered an “unconfirmed transaction” or a “0 confirmation transaction” if you want to know more about the Mempool, check this page out.
- When miners pick the tx and include it into the block connected to the blockchain, you get a confirmed transaction.
There is a certain amount of txs that a block can hold. Right now, the average transaction amount is 2500 txs. Sometimes there is a “traffic jam” in the Bitcoin network, meaning that there are a lot of transactions waiting for confirmation. And at such moments, miners have to decide what Bitcoin transactions to confirm and carry out first. That is when miners look at the attached Bitcoin transaction fees to the transactions.
Thus, a transaction fee is a way of signaling to the miner how urgent your transaction is. If you want to get confirmed faster, you’ll attach a larger fee. If you’re not so time-sensitive, you can do it with a smaller fee. It’s important to note that fees are always paid for by the sender of the transaction.
What is also necessary to know is that the Bitcoin blockchain does not have fees shown explicitly. The only way to deduce what fee was paid by the sender is to calculate the difference between how many Bitcoins were sent minus how many were received and how many were returned as change. This will be explained in section 3.
2. How are Bitcoin Fees Calculated?
If you want your Bitcoin to get mined, you have to pay a fee for the transaction. For educational purposes, I will explain here how to calculate the Bitcoin transaction fees in a simple way since the procedure is a bit complicated for users, especially newbies.
A transaction is basically a file that is stored on your computer, and that has a certain size (in MB, for example). Miners want to get as much profit as possible. Their goal can be achieved through the so-called fee rate. A fee rate in the Bitcoin community is a ratio of a fee to size: the higher it is, the better for miners.
Here is another example for illustrative purposes. Suppose you wish to buy or rent an apartment, and in this case, you usually have a certain sum of money that a square foot costs. The apartment price is similar to the total fee you pay, but how you measure the apartment’s expensiveness is through how much money you are willing to give per square foot. So, in the Bitcoin community, the fee rate is Bitcoin’s cost per square foot.
The measure for fee rate is Satoshis per byte, where Satoshi is the smallest unit of account in Bitcoin. What it means is how many Satoshis you are willing to trade for every byte (unit of size) of your tx.
At any given moment, you can check here what’s the estimated required fee rate that will get your tx included in the next block. This rate is different depending on the network traffic jam or, in other words, how much the blockchain is crowded with unconfirmed transactions.
Calculating Tx Size
So, now you know that a transaction fee is correlated with tx’s size. The latter, in its turn, depends on a number of different factors. Here, I will mention the most vital ones:
- Number of inputs
Each Bitcoin you own, at its core, is just a reference to past txs that were sent to you, adding up to the amount you own. Bitcoin users call these references “inputs.” So, basically, you send to another user distinct inputs sent to you have received before. These distinct inputs are called “outputs.” And the size of any tx is in linear dependence with the number of inputs this tx has: the more inputs there are, the bigger the size. An average Bitcoin transaction size is around 522 bytes.
- Number of outputs and change
So, the inputs are Bitcoin references to the past txs, and outputs are the number of addresses you’re sending the digital currency in the blockchain or, to put it simply, other users. Suppose you are sending cryptocurrency to one address. Chances are, in reality, you will get two outputs. The one for the other user that is a recipient and the other to yourself where you get the change from your initial payment. Please, note that if the sum of your inputs is equal to the amount you need to pay, there will be no change output.
- Script complexity
For some txs, users add special features like multi-sig. Multisig means that to authorize the Bitcoin transaction, miners need to have several keys. Such practices always increase the tx size and consequently the transaction fee and at the same time maintain a higher level of security.
Having said all that, I can surely state that for average users, it is pretty complex to calculate the transaction size based solely on these factors. However, knowing a median transaction size of around 522 bytes might help to estimate the Bitcoin fee. Luckily, the crypto wallet websites (and especially the Bitcoin wallet) have the apparatus to calculate the tx size and fee for you, based on the average fee rate at the moment of transaction, so it helps to maintain your desire to buy Bitcoin on a certain level.
3. Reducing Tx Fees – Best Practices
Since all Bitcoin transactions require a certain Bitcoin fee to be paid, there are several ways you can avoid getting higher fees than average Bitcoin transaction fees. Here is the list of the most popular ones:
- Avoid sending transactions during a “traffic jam”
Sometimes the network can get extremely busy. Usually, such moments happen when the price plummets up, and many people wait for the best opportunity to buy Bitcoin. And these are the moment when users put higher fees on the txs to prioritize their transactions. And it can become costly to buy Bitcoin. The best way to save money is to postpone a tx to the time when the network is less crowded.
- Use a digital wallet that supports SegWit
SegWit (or Segregated Witness) is a special protocol that helps to reduce the transaction’s data packing, so you have a file that is smaller in size. Many wallets already support this feature, and it can cut costs substantially.
- Group your inputs
Licensed broker-dealers advise grouping your inputs since the more inputs your tx has, the bigger its size. And as you remember, the fee linearly depends on the tx’s size. If you aim to have lower fees, then you have to consolidate your inputs. You can achieve it by sending many small inputs to an address you own at such times when fees are low. In the future, it will enable you to have only one input. Therefore, the amount of money you will be paying for the tx will be smaller.
- Grouping your outputs
The other way is to group multiple outputs to one transaction. This way, you will be making payments to several addresses in one transaction, which will reduce the required fee. However, not all wallets support this feature.
4. How Bitcoin Wallets Deal with Fees
Bitcoin wallets have a feature to recommend a reasonable transaction fee. They estimate this cost by the current and recent levels of activity on the bitcoin network. They combine the data for a minimum fee and maximum fee giving you an average fee. Not all wallet and outbound crypto exchanges assess this data correctly and overbid fees for the average transaction.
However, most wallets (especially if you have a hardware wallet) have such options as adjusting the average Bitcoin transaction fee or at least set a minimum fee or give a preference for the payments. As I said earlier, to choose the right fee, you’ll first need to know your transaction size. If your wallet supplies you with that info, you can then use the feerate estimation table to figure out how much your inclusion into the blockchain costs.
Suppose you know that the tx size is 16,000 bytes and the average fee rate costs 10 Satoshis/byte, that means that you will have to pay 160,000 Satoshis as a transaction fee.
5. Some more information
In this section of the article, I will tackle issues such as first confirmation, acceleration of the speed of your tx, and derivatives trading.
Stuck? How do I speed up?
Quite often, you can find your tx to be stuck or unconfirmed. There are basically three reasons why it might have happened:
- The most possible and straightforward reason is that there is a “traffic jam” in the Bitcoin network.
- Other users have put higher fees on their transactions than you have.
- You are trying to send coins from a transaction you received that hasn’t been confirmed yet. It might seem weird, but some wallets do, in fact, allow it.
So what can you do to get your transaction included in the blockchain?
- The first solution is to wait till miners sort out previous transactions. Usually, three to five days is enough to get your first confirmation without any other legal advice. As with many things in life, you just have to wait.
- The second way is to apply a Replace By Fee (RBF) feature. RBF allows a wallet to rebroadcast a transaction with a fee at a higher cost. However, note that only a few wallets provide this feature.
- The third way is to use the so-called tx accelerators operated by mining pools. They add the tx to the next block they mine if they have the computing power to do so. Some pools have a price to get the average transaction into the next block. For all of them, you have to know your tx id. The tx identifier can usually be found inside the list of transactions in your wallet.
I recommend using the accelerators below:
- The ConfirmTX accelerator will boost transactions below 250 bytes. However, larger transactions require $5 payments.
- The Coolwave accelerator works well if you have an account on the BitcoinTalk forum.
- ViaBTC’s accelerator is free, but it’s often unavailable, as it only accepts 100 unconfirmed transactions per hour. Therefore, in order for it to be accepted, you will likely have to repeatedly resubmit your tx id at the top of every hour.
I have talked with a professional financial advisor that can offer legal advice on investing, and they said that such advice of using an accelerator is the easiest one.
If you have tried everything I have listed above and your tx is still stuck somewhere in the Bitcoin network, the last resort will be double-spending which means that you send your tx one more time, but with a higher fee. It is close to the RBF, but with one relevant distinction: with RBF, you can seek legal professional advice, and they work by established protocol rules, whereas double-spending is explicitly considered something you simply should not do.
Another form of last resort ways is the so-called Child Pays for Parent (CPFP) feature. It means that you essentially spend coins that are incoming but are yet unconfirmed. Anyone who can offer legal advice will vote against this option. Such advice is based on the idea that the fees on a new outgoing tx will be high enough to cover both themselves and the unconfirmed incoming transactions they depend on.
The double-spending and CPFP options are rather difficult procedures that place your funds at risk and are not meant for an average user. But if you are interested in how they work, please refer to the Bitcoin wiki details on these.
Tx got stuck?
There might be times when you think that your tx is stuck forever, but in fact, there is a little chance it may happen. As I said in the beginning, the average transaction is put into the mempool till miners will pick it up. And the mempool does not have a certain place. Each node for validating tx has a part in its hard drive that is dedicated to storing pending transactions. And each node has different versions of the mempool, depending on their computing power and what transactions are known and remembered by them. If a transaction did not get the first confirmation for a long period of time, it will eventually be erased from a node’s mempool. The current default timeout is 72 hours, but nodes may set their own duration.
The transactions with the lowest value will also be dropped from the mempool, as higher fee transactions are entered, and the mempool is limited in size.
This is why waiting for at least 72 hours will probably yield one of two results: Either your tx will get confirmed, or it will get erased from all of the mem pools in the network, and the funds will be returned to your wallet.
Having said that, it’s possible that a certain node will never forget about your tx and may even occasionally rebroadcast it, which reminds other nodes about it. In that case, your tx can be stuck forever.
Paying for sending Bitcoin?
Sometimes people wonder whether it is free to send Bitcoin. Many things have changed since the development of Bitcoin, such as new rules according to which now we have an average Bitcoin transaction fee. But before you could even send transactions for free if your transaction were small enough in size or if it had “priority.” The Bitcoin fee goes to the miners who entered the tx into a successfully mined block.
6. The bottom line
As you can see, calculating the price for your tx fees is a complex issue. And actually, Bitcoin Cash was created to deal with the Bitcoin block size issue, which limits the amount of transactions Bitcoin can process with each block. Since the computing power is not enough, there is usually a very long queue of pending transactions, resulting in extremely high average transaction fees.
Keeping fees low is important since having a cheap peer-to-peer payment system is one of the goals Bitcoin was created to achieve. Still, as always, there are other considerations to take into account, aside from low fees (more on that in another post).
As Bitcoin grows in popularity, more and more people will be using it, and the network needs new solutions to handle the demand, but they cannot be sought independently. One promising candidate for such a solution is the Lightning Network which is aimed to provide nearly instant, free transactions to all users of the Bitcoin network.
How much does Bitcoin charge per transaction?
To calculate the appropriate fee for your transaction, you will need to multiply your tx size with the fee rate required to enter the next block.
Is there a fee for buying Bitcoin?
To buy Bitcoin, you have to pay a transaction fee, the size of which depends on the price of the crypto exchange that you use and the fiat currency you have (like USD).
How do I avoid Bitcoin fees?
There are no explicit ways to avoid paying a transaction fee. Average Bitcoin transaction fees are quite small when there is no “traffic jam.” More transactions happening at one time increase the fee price.
Why are Bitcoin transaction fees so high?
Sometimes the Bitcoin blockchain gets overcrowded, and people attach a higher fee to their transaction to fast forward their unconfirmed transactions. This, in turn, creates a “fee war,” and the fee price plummets up.
Is Buying Bitcoin Safe?
Buying Bitcoin is safe whenever you use a vetted and respected platform. It’s important to research any platform where you’re considering purchasing Bitcoin before you decide to take the plunge. However, it does fluctuate more than any other currency.