<p>From the perspective of a transaction, there is no one &quot;amount&quot;. A transaction has one or more inputs of certain amounts (determined by the transactions that created those UTXOs) and one or more outputs of certain amounts (determined in the transaction itself). The difference of the sum of input and output amounts is the transaction fee.</p>
<p>From the perspective of a wallet user, however, there usually is one specific &quot;amount&quot; that they want to send in a transaction, which becomes the amount in the output that goes to the recipient. After a desirable fee rate is determined, the wallet selects UTXOs to fund the transaction (see <a href="/questions/tagged/coin-selection" class="s-tag post-tag" title="show questions tagged &#39;coin-selection&#39;" aria-label="show questions tagged &#39;coin-selection&#39;" rel="tag" aria-labelledby="tag-coin-selection-tooltip-container" data-tag-menu-origin="Unknown">coin-selection</a>). In most cases a combination of UTXOs with a perfectly matching amount will not be found, in which case a change output will be added that sends the remainder back to the sender (see <a href="/questions/tagged/change" class="s-tag post-tag" title="show questions tagged &#39;change&#39;" aria-label="show questions tagged &#39;change&#39;" rel="tag" aria-labelledby="tag-change-tooltip-container" data-tag-menu-origin="Unknown">change</a>).</p>

CC BY-SA 4.0
2024-11-09T16:06:38.430Z
2024-11-09T16:07:21.893Z
2024-11-09T16:07:21.893Z
Vojtěch Strnad
<p>Alice has 2 UTXOs of 10.000 sats each.</p>
<p>She wants to pay Bob 15.000 sats.</p>
<p>The wallet will:</p>
<ul>
<li>select both UTXOs as inputs (total 20.000 sats)</li>
<li>define 2 outputs:
<ul>
<li>15.000 sats to Bob</li>
<li>5.000 sats to Alice</li>
</ul>
</li>
</ul>
<p>The wallet needs to know the amount from Alice to know how to divide sats between outputs.</p>

CC BY-SA 4.0
2024-11-09T16:24:08.780Z
2024-11-09T16:24:08.780Z
bordalix
<p>Reading this again after <a href="https://bitcoin.stackexchange.com/a/124710/5406">@amaclin’s answer</a>, I realize that you might have indeed been asking about the input amounts rather than the output amounts. If so, you are correct. The input amounts are not explicitly specified in the transaction as they are specified by the prior transaction that created the UTXOs. A spending transaction only needs to specify which UTXOs it exactly spends, but the information about the output script and amount are already present in each node’s UTXO set.</p>
<hr />
<p>If you were asking about output amounts, see my original answer below:</p>
<p>It depends on the type of transaction you are building.</p>
<p>If you are sweeping a wallet, consolidating into a single output or depositing several whole UTXOs to a service, you probably do not care about specifying the amount of the output. Rather, it is implicitly defined by the inputs and fees.</p>
<p>However, in my experience, most transactions are created to make one or multiple payments. When you make a payment transaction, you do want to send a specific amount to each receiver of the payment. Only the potential change output amount would then be determined by what remains from the inputs after deducting the payment amount and the fees.</p>

CC BY-SA 4.0
2024-11-09T16:06:27.360Z
2024-11-10T00:43:07.393Z
2024-11-10T00:43:07.393Z
Murch
<pre><code>Does the user really need to specify the amount at all
</code></pre>
<p>No. Transaction itself does not contain the amounts on inputs. But these values are used while creating ecdsa/schnorr signatures</p>

CC BY-SA 4.0
2024-11-09T17:41:06.193Z
2024-11-09T17:51:43.870Z
2024-11-09T17:51:43.870Z
amaclin
<p>I'm trying to understand the Bitcoin transaction creation process and how inputs and outputs work. From what I know, when a user creates a Bitcoin transaction, they typically select UTXOs (Unspent Transaction Outputs) as inputs to the transaction.</p>
<p>Given this, it seems that the amount of the transaction is implicitly determined by the UTXOs selected, since the sum of the inputs is what gets spent. In other words, the total amount of Bitcoin being sent would be based on the value of the UTXOs used in the inputs, while the user doesn't need to explicitly specify the amount.</p>
<p>Is that correct? Does the user really need to specify the amount at all, or is it entirely determined by the selected UTXOs? And if there's any difference, what is the role of specifying the amount in some wallet interfaces?</p>

<transactions><utxo>
Does the user not need to specify the amount in the transaction creation process as the amount is implicitly determined by the UTXOs they select?
Ashank
# Does the user not need to specify the amount in the transaction creation process as the amount is implicitly determined by the UTXOs they select?

(Asked by: username_0 on 2024-11-09)

I'm trying to understand the Bitcoin transaction creation process and how inputs and outputs work. From what I know, when a user creates a Bitcoin transaction, they typically select UTXOs (Unspent Transaction Outputs) as inputs to the transaction.

Given this, it seems that the amount of the transaction is implicitly determined by the UTXOs selected, since the sum of the inputs is what gets spent. In other words, the total amount of Bitcoin being sent would be based on the value of the UTXOs used in the inputs, while the user doesn't need to explicitly specify the amount.

Is that correct? Does the user really need to specify the amount at all, or is it entirely determined by the selected UTXOs? And if there's any difference, what is the role of specifying the amount in some wallet interfaces?

**Tags:** transactions, utxo


---

## 4 answers

### Answer by username_1 on 2024-11-09. Score: 4

From the perspective of a transaction, there is no one "amount". A transaction has one or more inputs of certain amounts (determined by the transactions that created those UTXOs) and one or more outputs of certain amounts (determined in the transaction itself). The difference of the sum of input and output amounts is the transaction fee.

From the perspective of a wallet user, however, there usually is one specific "amount" that they want to send in a transaction, which becomes the amount in the output that goes to the recipient. After a desirable fee rate is determined, the wallet selects UTXOs to fund the transaction (see [coin-selection](/questions/tagged/coin-selection "show questions tagged 'coin-selection'")). In most cases a combination of UTXOs with a perfectly matching amount will not be found, in which case a change output will be added that sends the remainder back to the sender (see [change](/questions/tagged/change "show questions tagged 'change'")).


---

### Answer by username_2 on 2024-11-09. Score: 2

Alice has 2 UTXOs of 10.000 sats each.

She wants to pay Bob 15.000 sats.

The wallet will:

* select both UTXOs as inputs (total 20.000 sats)
* define 2 outputs:
  + 15.000 sats to Bob
  + 5.000 sats to Alice

The wallet needs to know the amount from Alice to know how to divide sats between outputs.


---

### Answer by username_3 on 2024-11-09. Score: 2

Reading this again after [@username_4’s answer](https://bitcoin.stackexchange.com/a/124710/5406), I realize that you might have indeed been asking about the input amounts rather than the output amounts. If so, you are correct. The input amounts are not explicitly specified in the transaction as they are specified by the prior transaction that created the UTXOs. A spending transaction only needs to specify which UTXOs it exactly spends, but the information about the output script and amount are already present in each node’s UTXO set.

---

If you were asking about output amounts, see my original answer below:

It depends on the type of transaction you are building.

If you are sweeping a wallet, consolidating into a single output or depositing several whole UTXOs to a service, you probably do not care about specifying the amount of the output. Rather, it is implicitly defined by the inputs and fees.

However, in my experience, most transactions are created to make one or multiple payments. When you make a payment transaction, you do want to send a specific amount to each receiver of the payment. Only the potential change output amount would then be determined by what remains from the inputs after deducting the payment amount and the fees.


---

### Answer by username_4 on 2024-11-09. Score: 1

```
Does the user really need to specify the amount at all

```

No. Transaction itself does not contain the amounts on inputs. But these values are used while creating ecdsa/schnorr signatures


---

