user5254: I'm moving my bitcoins to Armory because its deterministic wallets are SO much better for keeping good backups. But bitcoin core didn't make it easy for me to sent all my money - if I specified all of it, it complained that my transaction + the 0.0001 fee I specified was more than my balance (makes sense). But when I specified my balance minus 0.0001, it complained that my transaction + the fee of 0.0002 (which was twice what I specified) was more than my balance. Wtf right?
So I played around with it til I sent all but a few cents of my balance. So I have 0.000047 BTC left, which isn't a big deal, but it feels wrong to just leave it there to rot. How can i recover those micro bitcoins without losing the whole transaction to a fee? 

user9382: Re: Bitcoin-QT Core 

Your balance showing in BTC may not be the actual amount; is the Blockchain fully synchronised?
Your BTC may be spread over several private keys ie addresses in your dat wallet
The floating point value may be being rounded to an integer (ie 0.000297 may show up as 0.0003)

I'd go about it like this: 

Open options under BitcoinQT settings; 
tick "display addresses in txn list" &
"display coin control features"
Wait for Blockchain to synchronise 
Open 'Send' tab 

tick Coin Control Features; inputs 
choose the input addresses with BTC in them

Fill out Sender address, etc
Right click the total BTC being sent; choose copy amount to send after txn fee
Paste this figure (BTC being sent minus txn fee) into the Amount box at the bottom
Send to your new address; leave Bitcoin-QT open so it can relay the txn


user5254: Ok, I've successfully transferred my .000047 BTC to my other wallet using the Bitcoin Core client. Aussie's information was pretty much critical to me figuring out how to do it. Basically, I sent myself a significant amount of bitcoins, waited a couple days, then transferred everything back to my other wallet.
Because it requires the use of sending bitcoins there first, and transferring those bitcoins to another wallet, it will only work if you're sending bitcoins to yourself. But you could use this technique to basically aggregate bitcoins into one transaction, which can then be used to send small amounts of bitcoins to someone else. Here's the method:

Decide how in-a-rush you are - how many days you want to wait to be able to transfer the money.
Calculate how many bitcoins it would take to make your transaction reach a priority above 57,600,000 in that amount of time
Send that many bitcoins to the wallet with a very small amount of BTC
Wait the number of days you decided in step 1
Send the bitcoins where ever you want with no fee!

Calculating Priority
The bitcoin wiki page on Transaction Fees describes how to calculate the priority of a transaction. Here's my embellishment to that:

priority = sum(inputValue_t * inputAge_t)/sizeInBytes
inputValue_t = numberOfBitcoins_t*100'000'000
sizeInBytes = 78+148*numberOfTransactions

where

sum is the sum over all the transaction inputs.
_t indicates the value is for a particular transaction in the sum
inputValue_t is the amount of bitcoin in base units in a given transaction to one of your wallets
inputAge_t is the number of confirmations that transaction input has undergone
numberOfBitcoins_t is the raw number of bitcoins of a transaction input (this can be seen if you enable Coin Control Features and click on the "Inputs" button in the Send view of Bitcoin Core)
sizeInBytes is the number of bytes the whole new outgoing transaction takes up.
numberOfTransactions is the number of transactions in the sum

So that priority that you calculate must be greater than 57.6 million in order to send without a fee. So if you have a small number of bitcoins stuck somewhere, you need to add a new larger transaction that can pull them out essentially. 
Calcuating how many new bitcoins you need
Here's a simplified equation solved for that new larger transaction's amount of bitcoins:

newTransaction = (.576 * (78 + 148*numberOfTransactions) - sum(inputBitcoins_t * inputAge_t)) / (144 * days)

where

numberOfTransactions is the number of old transactions you have plus 1 (the new transaction you'll need)
inputBitcoins_t is the number of bitcoins (not "base units" - just the raw number of bitcoins)
inputAge_t is the number of confirmations of each old transaction
days is the number of days you're willing to wait

There's a confirmation about once every 10 minutes, which adds up to 144 confirmations per day. and .576 comes from 57.6 million divided by the ratio of base units to raw bitcoins (100 million)
Example
Lets say you have the following two inputs

.00004 bitcions with 400 confirmations
.00001 bitcoins with 95000 confirmations

The priority is slightly less than 2500000 ~= (.00004*400+.0001*95000)*100*1000*1000/(78+148*2)
The number of new bitcoins you would need to send the transaction in 2 days is slightly less than 1.011 bitcoins ~= (.576*(78+148*3) - (.00004*400+.0001*95000))/(144*2)

5254: <p>I'm moving my bitcoins to Armory because its deterministic wallets are SO much better for keeping good backups. But bitcoin core didn't make it easy for me to sent all my money - if I specified all of it, it complained that my transaction + the 0.0001 fee I specified was more than my balance (makes sense). But when I specified my balance minus 0.0001, it complained that my transaction + the fee of 0.0002 (which was twice what I specified) was more than my balance. Wtf right?</p>

<p>So I played around with it til I sent all but a few cents of my balance. So I have 0.000047 BTC left, which isn't a big deal, but it feels wrong to just leave it there to rot. How can i recover those micro bitcoins without losing the whole transaction to a fee? </p>
 9382: <p>Re: Bitcoin-QT Core </p>

<ol>
<li>Your balance showing in BTC may not be the actual amount; is the Blockchain fully synchronised?</li>
<li>Your BTC may be spread over several private keys ie addresses in your dat wallet</li>
<li>The floating point value may be being rounded to an integer (ie 0.000297 may show up as 0.0003)</li>
</ol>

<p>I'd go about it like this: </p>

<ol>
<li>Open options under BitcoinQT settings; </li>
<li>tick "display addresses in txn list" &amp;</li>
<li>"display coin control features"</li>
<li>Wait for Blockchain to synchronise </li>
<li>Open 'Send' tab 
<ul>
<li>tick Coin Control Features; <em>inputs</em> </li>
<li>choose the input addresses with BTC in them</li>
</ul></li>
<li>Fill out Sender address, etc</li>
<li>Right click the total BTC being sent; choose <em>copy amount to send after txn fee</em></li>
<li>Paste this figure (BTC being sent minus txn fee) into the <em>Amount</em> box at the bottom</li>
<li>Send to your new address; leave Bitcoin-QT open so it can relay the txn</li>
</ol>
 5254: <p>Ok, I've successfully transferred my .000047 BTC to my other wallet using the Bitcoin Core client. Aussie's information was pretty much critical to me figuring out how to do it. Basically, I sent myself a significant amount of bitcoins, waited a couple days, then transferred everything back to my other wallet.</p>

<p>Because it requires the use of sending bitcoins there first, and transferring those bitcoins to another wallet, it will only work if you're sending bitcoins to yourself. But you could use this technique to basically aggregate bitcoins into one transaction, which can then be used to send small amounts of bitcoins to someone else. Here's the method:</p>

<ol>
<li>Decide how in-a-rush you are - how many days you want to wait to be able to transfer the money.</li>
<li>Calculate how many bitcoins it would take to make your transaction reach a priority above 57,600,000 in that amount of time</li>
<li>Send that many bitcoins to the wallet with a very small amount of BTC</li>
<li>Wait the number of days you decided in step 1</li>
<li>Send the bitcoins where ever you want with <strong>no fee</strong>!</li>
</ol>

<h1>Calculating Priority</h1>

<p>The <a href="https://en.bitcoin.it/wiki/Transaction_fee" rel="nofollow">bitcoin wiki page on Transaction Fees</a> describes how to calculate the priority of a transaction. Here's my embellishment to that:</p>

<ul>
<li><strong>priority</strong> = sum(inputValue_t * inputAge_t)/sizeInBytes</li>
<li><strong>inputValue_t</strong> = numberOfBitcoins_t*100'000'000</li>
<li><strong>sizeInBytes</strong> = 78+148*numberOfTransactions</li>
</ul>

<p>where</p>

<ul>
<li><strong>sum</strong> is the sum over all the transaction inputs.</li>
<li><strong>_t</strong> indicates the value is for a particular transaction in the sum</li>
<li><strong>inputValue_t</strong> is the amount of bitcoin in <strong>base units</strong> in a given transaction to one of your wallets</li>
<li><strong>inputAge_t</strong> is the number of confirmations that transaction input has undergone</li>
<li><strong>numberOfBitcoins_t</strong> is the raw number of bitcoins of a transaction input (this can be seen if you enable Coin Control Features and click on the "Inputs" button in the Send view of Bitcoin Core)</li>
<li><strong>sizeInBytes</strong> is the number of bytes the whole new outgoing transaction takes up.</li>
<li><strong>numberOfTransactions</strong> is the number of transactions in the sum</li>
</ul>

<p>So that priority that you calculate must be greater than 57.6 million in order to send without a fee. So if you have a small number of bitcoins stuck somewhere, you need to add a new larger transaction that can pull them out essentially. </p>

<h1>Calcuating how many new bitcoins you need</h1>

<p>Here's a simplified equation solved for that new larger transaction's amount of bitcoins:</p>

<ul>
<li><strong>newTransaction</strong> = (.576 * (78 + 148*numberOfTransactions) <strong>-</strong> sum(inputBitcoins_t * inputAge_t)) / (144 * days)</li>
</ul>

<p>where</p>

<ul>
<li><strong>numberOfTransactions</strong> is the number of old transactions you have plus 1 (the new transaction you'll need)</li>
<li><strong>inputBitcoins_t</strong> is the number of bitcoins (not "base units" - just the raw number of bitcoins)</li>
<li><strong>inputAge_t</strong> is the number of confirmations of each old transaction</li>
<li><strong>days</strong> is the number of days you're willing to wait</li>
</ul>

<p>There's a confirmation about once every 10 minutes, which adds up to 144 confirmations per day. and .576 comes from 57.6 million divided by the ratio of base units to raw bitcoins (100 million)</p>

<h1>Example</h1>

<p>Lets say you have the following two inputs</p>

<ul>
<li>.00004 bitcions with 400 confirmations</li>
<li>.00001 bitcoins with 95000 confirmations</li>
</ul>

<p>The <strong>priority</strong> is slightly less than <em>2500000</em> ~= (.00004*400+.0001*95000)*100*1000*1000/(78+148*2)</p>

<p>The number of <strong>new bitcoins</strong> you would need to send the transaction in 2 days is slightly less than <em>1.011</em> bitcoins ~= (.576*(78+148*3) - (.00004*400+.0001*95000))/(144*2)</p>
