<p>Sorry, I think I have found how to calculate transaction fee.
So we have to subtract sum of <code>out</code> values from <code>inputs.prev_out.value</code>.</p>

CC BY-SA 4.0
2018-10-13T06:33:50.820Z
it should be calculate from json out and input value subtract.
xds2000
CC BY-SA 3.0
2017-09-02T18:50:54.103Z
2017-09-02T18:50:54.103Z
Invis1ble
<p>I have transaction id, how can I get a fee of this transaction from blockchain.info? For example I see that 
this transaction <a href="https://blockchain.info/tx/https://blockchain.info/tx/963b9f407aabf8ebca660763bc5d3e8800eb6a5dffaf692cd061f0525ee770e1" rel="nofollow noreferrer">https://blockchain.info/tx/https://blockchain.info/tx/963b9f407aabf8ebca660763bc5d3e8800eb6a5dffaf692cd061f0525ee770e1</a> has 0.00105453 BTC fee, but there is no such number in json data <a href="https://blockchain.info/tx/963b9f407aabf8ebca660763bc5d3e8800eb6a5dffaf692cd061f0525ee770e1?format=json" rel="nofollow noreferrer">https://blockchain.info/tx/963b9f407aabf8ebca660763bc5d3e8800eb6a5dffaf692cd061f0525ee770e1?format=json</a></p>

<p>I'm new in bitcoin and I'm trying to write some scripts.<br>
Thanks.</p>

<blockchain.info><transaction-fees><api>
How to get transaction fee
Invis1ble
# How to get transaction fee

(Asked by: username_0 on 2017-09-02)

I have transaction id, how can I get a fee of this transaction from blockchain.info? For example I see that
this transaction <https://blockchain.info/tx/https://blockchain.info/tx/963b9f407aabf8ebca660763bc5d3e8800eb6a5dffaf692cd061f0525ee770e1> has 0.00105453 BTC fee, but there is no such number in json data <https://blockchain.info/tx/963b9f407aabf8ebca660763bc5d3e8800eb6a5dffaf692cd061f0525ee770e1?format=json>

I'm new in bitcoin and I'm trying to write some scripts.  
Thanks.

**Tags:** blockchain.info, transaction-fees, api


---

## 1 answers

### Answer by username_0 on 2017-09-02. Score: 3 | Accepted answer

Sorry, I think I have found how to calculate transaction fee.
So we have to subtract sum of `out` values from `inputs.prev_out.value`.

> **Comments:**
> **username_1**: it should be calculate from json out and input value subtract.  

---

