# About calculating gas' cost

I was reading an old post: How to get the actual Gas price?

If the gas price currently is, for instance, 14 gwei and I have a transaction cost of 80000, does it mean the price of my transaction is 14*80000 = 1120000 gwei?

And last question, do I gotta add my execution cost to transaction cost in order to know the total cost of my operation (I'm using Remix IDE)? Thanks in advance!

## 1 Answer

If the gas price currently is, for instance, 14 gwei and I have a transaction cost of 80000, does it mean the price of my transaction is 14*80000 = 1120000 gwei?

Correct. The gas price is how much you pay for each unit of gas used by the transaction. You can use the tool here to convert from Gwei to Ether.

And last question, do I gotta add my execution cost to transaction cost in order to know the total cost of my operation (I'm using Remix IDE)?

You want to look at the transaction cost, this is the total amount of gas that the transaction used. The execution cost is the total cost of executing the code in the smart contract, so it does not include the base transaction cost (21,000 gas) and the cost of the data included in the transaction, etc.

• Oh, I see... thanks a lot. But I have to pay that cost, right? (I'm talking about execution cost). I mean, I have to pay transaction cost + execution cost at the end. – Joncarre Oct 27 '20 at 13:13
• The transaction cost includes the execution cost. – Morten Oct 27 '20 at 13:49