<p>VOUT is the index of the output within the transaction that the input is spending.  The first output in a transaction is index 0, the second is index 1, etc.  The transaction you referenced has two outputs, so it has outputs 0 and 1.  You would reference txid:0 to spend the first output and txid:1 to spend the second output.</p>

CC BY-SA 3.0
2013-12-31T21:00:16.897Z
Thank you that makes a ton of sense don't know why I was having trouble with it!
michael.schuett
CC BY-SA 3.0
2013-12-31T20:45:19.697Z
2013-12-31T20:45:19.697Z
ScripterRon
<p>I have searched around for this and found the following article <a href="https://bitcoin.stackexchange.com/questions/11411/in-getrawtransaction-what-is-the-vout-integer-in-the-vin-list">In getrawtransaction, what is the vout integer in the vin list?</a>. However I am a very visual learner and this does not make much sense mostly because the two transactions I tested don't seem to follow the rule in the post or more likely I don't get it.</p>

<p>For transaction <a href="https://blockchain.info/tx/1d7f54deccb7b2646a4ba83c6884dbac953b0588c8943d0e7e8f7c8f559d5d72" rel="nofollow noreferrer"><code>1d7f54deccb7b2646a4ba83c6884dbac953b0588c8943d0e7e8f7c8f559d5d72</code></a> I expect the <code>vout</code> to be 1 which is correct and I validated through use of <code>gettxid</code>.</p>

<p>However for transaction <a href="https://blockchain.info/tx/ef96555197df4397ac4fed180903ce760fe8b59b85da83baba5ecd2a0fac7ec1" rel="nofollow noreferrer"><code>ef96555197df4397ac4fed180903ce760fe8b59b85da83baba5ecd2a0fac7ec1</code></a> I expect the <code>vout</code> to be 2 which is not correct per validation with <code>gettxid</code>. The correct number is in fact 0.</p>

<p>Can anyone explain this to me why <code>vout</code> for the second transaction would be 0?</p>

<transactions>
Understanding Vout
michael.schuett
# Understanding Vout

(Asked by: username_0 on 2013-12-31)

I have searched around for this and found the following article [In getrawtransaction, what is the vout integer in the vin list?](https://bitcoin.stackexchange.com/questions/11411/in-getrawtransaction-what-is-the-vout-integer-in-the-vin-list). However I am a very visual learner and this does not make much sense mostly because the two transactions I tested don't seem to follow the rule in the post or more likely I don't get it.

For transaction [`1d7f54deccb7b2646a4ba83c6884dbac953b0588c8943d0e7e8f7c8f559d5d72`](https://blockchain.info/tx/1d7f54deccb7b2646a4ba83c6884dbac953b0588c8943d0e7e8f7c8f559d5d72) I expect the `vout` to be 1 which is correct and I validated through use of `gettxid`.

However for transaction [`ef96555197df4397ac4fed180903ce760fe8b59b85da83baba5ecd2a0fac7ec1`](https://blockchain.info/tx/ef96555197df4397ac4fed180903ce760fe8b59b85da83baba5ecd2a0fac7ec1) I expect the `vout` to be 2 which is not correct per validation with `gettxid`. The correct number is in fact 0.

Can anyone explain this to me why `vout` for the second transaction would be 0?

**Tags:** transactions


---

## 1 answers

### Answer by username_1 on 2013-12-31. Score: 8 | Accepted answer

VOUT is the index of the output within the transaction that the input is spending. The first output in a transaction is index 0, the second is index 1, etc. The transaction you referenced has two outputs, so it has outputs 0 and 1. You would reference txid:0 to spend the first output and txid:1 to spend the second output.

> **Comments:**
> **username_0**: Thank you that makes a ton of sense don't know why I was having trouble with it!  

---

