<p>When you said "as a result you have two outputs: The spent amount and the change", that is only one special case for Bitcoin transactions.</p>

<p>In a general Bitcoin transaction, here is what actually happens:</p>

<ul>
<li>One or more inputs, each with a valid signature, "dumps" coin value into the transaction.</li>
<li>One or more outputs each "extracts" value from the transaction.</li>
<li>Any remaining value (which must be zero or positive - but not negative) is considered to be a transaction fee for the miner to grab.</li>
<li>(A special case of inputs is that the first transaction of each block is a coinbase transaction, and the single input is allowed to synthesize a certain amount of value from nothing.)</li>
</ul>

<p>In light of this view, it should be clear that multiple outputs are allowed.</p>

<hr>

<p>Let's illustrate with an example. Suppose some friends want do a transaction together because they want to share and save on the transaction fee:</p>

<ul>
<li>Alice dumps one input valued at 3 BTC into the transaction.</li>
<li>Alice dumps another input valued at 2 BTC into the transaction.</li>
<li>Bob dumps one input valued at 4 BTC into the transaction.</li>
<li>Alice wants to pay Carol 2.5 BTC, so this is added as an output.</li>
<li>Bob wants to pay Dave 3.99 BTC, so this is added as an output.</li>
<li>Alice and Bob each agree to pay 0.01 BTC as a transaction fee.</li>
<li>Bob needs no change.</li>
<li>Alice needs 2.49 BTC in change, so this is added as an output.</li>
</ul>

<p>Transaction summary:</p>

<ul>
<li>Input: +3.00 BTC (from Alice)</li>
<li>Input: +2.00 BTC (from Alice)</li>
<li>Input: +4.00 BTC (from Bob)</li>
<li>Output: -2.50 BTC to Carol (payment)</li>
<li>Output: -3.99 BTC to Dave (payment)</li>
<li>Output: -2.49 BTC to Alice (change)</li>
<li>Fee: -0.02 BTC to miner</li>
<li>Final balance: 0.00 BTC (must always be zero)</li>
</ul>

CC BY-SA 3.0
2016-03-01T21:13:25.667Z
I've seen how multiple recipients are specified. How do you combine inputs from different wallets though? Do you each enter your respective wallet addresses into a third party transaction client?
KalenGi
CC BY-SA 3.0
2016-03-01T23:47:08.543Z
That really depends on the implementation. Personally I craft raw Bitcoin transactions using custom tools, so nothing prevents me from doing something like this. But for actual Bitcoin front-end GUIs, I have doubts that any of them can do this.
Nayuki
CC BY-SA 3.0
2016-03-01T23:50:21.747Z
One real-life example of multiple outputs is that the operator of a mining pool needs to pay out the block reward to many many users. Because the Bitcoin protocol allows it, this can be done in just one transaction, instead of one transaction per output.
Nayuki
CC BY-SA 3.0
2016-03-01T20:57:34.810Z
2016-03-01T20:57:34.810Z
Nayuki
<p>Short answer: yes, you can do multiple payments in one transaction, and that's more efficient than doing them separately.</p>

CC BY-SA 3.0
2016-03-01T15:20:36.730Z
2016-03-01T15:20:36.730Z
Pieter Wuille
<blockquote>
  <p>How is it then that a transaction can have four outputs? Is it possible to pay more than one person (address) in a single transaction?</p>
</blockquote>

<p>Yes, a transaction can have several inputs and several outputs. Those inputs and outputs can belong to the same user or a different user. So user A and B could make a transaction that combines several of their addresses and send money to C and D in as many of their addresses as they see fit. </p>

<p>Actually the change address that you mentioned is not a special output; just an output that sends some money to any of your addresses.</p>

CC BY-SA 3.0
2016-03-01T15:37:36.030Z
What Bitcoin client do you use to perform such transactions? The only capabilities I've come across so far are to send/receive to a single address.
KalenGi
CC BY-SA 3.0
2016-03-01T15:54:32.977Z
Bitcoin Core's bitcoind has a sendmany RPC, and its GUI allows entering multiple addresses/amounts/payment requests.
Pieter Wuille
CC BY-SA 3.0
2016-03-01T16:18:15.123Z
@KalenGi see [here](http://bitcoin.stackexchange.com/questions/35686/how-do-you-send-to-multiple-addresses-by-paying-a-one-time-fee-which-wallet-sup) and [here](http://bitcoin.stackexchange.com/questions/13442/how-to-do-mass-payouts-in-my-application-to-multiple-addresses-at-once-or-very) for details/examples.
karask
CC BY-SA 3.0
2016-03-01T15:22:02.750Z
2016-03-01T15:22:02.750Z
karask
<p>I saw a Bitcoin transaction that has 6 inputs and 4 outputs. I understand that several inputs are sometimes used in order to meet the amount requirements of the output. As a result you have two outputs: The spent amount and the change.</p>

<p>How is it then that a transaction can have four outputs? Is it possible to pay more than one person (address) in a single transaction?</p>

<transactions><output>
How would you end up with more than two transaction outputs?
KalenGi
# How would you end up with more than two transaction outputs?

(Asked by: username_0 on 2016-03-01)

I saw a Bitcoin transaction that has 6 inputs and 4 outputs. I understand that several inputs are sometimes used in order to meet the amount requirements of the output. As a result you have two outputs: The spent amount and the change.

How is it then that a transaction can have four outputs? Is it possible to pay more than one person (address) in a single transaction?

**Tags:** transactions, output


---

## 3 answers

### Answer by username_3 on 2016-03-01. Score: 7 | Accepted answer

> How is it then that a transaction can have four outputs? Is it possible to pay more than one person (address) in a single transaction?

Yes, a transaction can have several inputs and several outputs. Those inputs and outputs can belong to the same user or a different user. So user A and B could make a transaction that combines several of their addresses and send money to C and D in as many of their addresses as they see fit.

Actually the change address that you mentioned is not a special output; just an output that sends some money to any of your addresses.

> **Comments:**
> **username_0**: What Bitcoin client do you use to perform such transactions? The only capabilities I've come across so far are to send/receive to a single address.  
> **username_2**: Bitcoin Core's bitcoind has a sendmany RPC, and its GUI allows entering multiple addresses/amounts/payment requests.  
> **username_3**: @username_0 see [here](http://bitcoin.stackexchange.com/questions/35686/how-do-you-send-to-multiple-addresses-by-paying-a-one-time-fee-which-wallet-sup) and [here](http://bitcoin.stackexchange.com/questions/13442/how-to-do-mass-payouts-in-my-application-to-multiple-addresses-at-once-or-very) for details/examples.  

---

### Answer by username_1 on 2016-03-01. Score: 5

When you said "as a result you have two outputs: The spent amount and the change", that is only one special case for Bitcoin transactions.

In a general Bitcoin transaction, here is what actually happens:

* One or more inputs, each with a valid signature, "dumps" coin value into the transaction.
* One or more outputs each "extracts" value from the transaction.
* Any remaining value (which must be zero or positive - but not negative) is considered to be a transaction fee for the miner to grab.
* (A special case of inputs is that the first transaction of each block is a coinbase transaction, and the single input is allowed to synthesize a certain amount of value from nothing.)

In light of this view, it should be clear that multiple outputs are allowed.

---

Let's illustrate with an example. Suppose some friends want do a transaction together because they want to share and save on the transaction fee:

* Alice dumps one input valued at 3 BTC into the transaction.
* Alice dumps another input valued at 2 BTC into the transaction.
* Bob dumps one input valued at 4 BTC into the transaction.
* Alice wants to pay Carol 2.5 BTC, so this is added as an output.
* Bob wants to pay Dave 3.99 BTC, so this is added as an output.
* Alice and Bob each agree to pay 0.01 BTC as a transaction fee.
* Bob needs no change.
* Alice needs 2.49 BTC in change, so this is added as an output.

Transaction summary:

* Input: +3.00 BTC (from Alice)
* Input: +2.00 BTC (from Alice)
* Input: +4.00 BTC (from Bob)
* Output: -2.50 BTC to Carol (payment)
* Output: -3.99 BTC to Dave (payment)
* Output: -2.49 BTC to Alice (change)
* Fee: -0.02 BTC to miner
* Final balance: 0.00 BTC (must always be zero)

> **Comments:**
> **username_0**: I've seen how multiple recipients are specified. How do you combine inputs from different wallets though? Do you each enter your respective wallet addresses into a third party transaction client?  
> **username_1**: That really depends on the implementation. Personally I craft raw Bitcoin transactions using custom tools, so nothing prevents me from doing something like this. But for actual Bitcoin front-end GUIs, I have doubts that any of them can do this.  
> **username_1**: One real-life example of multiple outputs is that the operator of a mining pool needs to pay out the block reward to many many users. Because the Bitcoin protocol allows it, this can be done in just one transaction, instead of one transaction per output.  

---

### Answer by username_2 on 2016-03-01. Score: 4

Short answer: yes, you can do multiple payments in one transaction, and that's more efficient than doing them separately.


---

