Why is my transaction not getting confirmed and what can I do about it? I sent a transaction


without (or with an exceptionally small) transaction fee
using extremely small or unconfirmed inputs
while the stars were not standing right.


For whatever reason, I have been waiting forever for my transaction to confirm. 

Why is it taking so long for my transaction to confirm? What can I do to speed-up the transaction’s confirmation?



This is a canonical question serving as a lightning rod for the flood of "unconfirmed transaction" questions we are experiencing lately. Please provide a detailed and broad answer to serve a wide range of these questions.
How Bitcoin Mining Works

Bitcoin transactions are mined (processed) by Miners, and Miners want to benefit from their work. By mining transactions with higher fees, they make more money. Some miners can decide to mine all transactions no matter the fee but they still must compete with every other financially motivated miner.

Why is it taking so long for my transaction to confirm?

If you have sent a transaction


  without (or with an exceptionally small) transaction fee


expect it to be ignored for an unknown amount of time until a miner decides to process it and solves the block; this could be several days to several weeks, possibly never. Your wallet and any Bitcoin node will show it as unconfirmed, your transaction is stuck in limbo.

Block sizes are limited, which means that only a limited number of transactions can be processed in a certain timeframe. In the beginning of bitcoin, there was lots of free space in each block because there were not many transactions. However, now that Bitcoin is quite popular there are more transactions than can be processed into the current block. This is why transaction fees have increased, and as long as someone is still willing to pay more they will keep increasing.

What can I do to speed-up the transaction’s confirmation?

Nothing. The next best thing is to cancel and resend the transaction.


Make a note of the individual bitcoin address(es) that the unconfirmed transaction was sent from.
Run Bitcoin Core with the -zapwallettxes option (or wait a few days until your wallet stops broadcasting the transaction and it falls out of the global transaction mempool). (Issue with mempool.dat resolved by #10330 in 0.15.0).
Send all your bitcoins from the addresses recorded in step 1 to a new address with the recommended or higher than recommended fee.
Make original transaction again using the recommended fee.


What to watch out for


Sites that claim to "speed up your unconfirmed bitcoin transaction". From personal experience, these sites are either scams or just don't work.
DOUBLE PAYMENTS. If the addresses used in the original transaction have sufficient bitcoin in them to cover the transaction, it can always be completed at a later date. To avoid this, follow step 3 to empty the associated addresses and do not reuse them.


What is the recommended fee?

Transaction fees vary by the size of your transaction, and not all transactions are the same size. The fee for same sized transactions also depends on how busy the bitcoin network is at the moment.
An estimate (at the time of original post) was between 11-20 satoshi/byte (0.00011-0.00020BTC/kB) but now can be much higher.
Most wallets have a feature which dynamically calculates the rate based on network congestion.

See https://bitcoinfees.earn.com/ for a live chart of suggested transaction fees