> For the complete documentation index, see [llms.txt](https://calnix.gitbook.io/eth-dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://calnix.gitbook.io/eth-dev/evm-storage-opcodes/transaction-costs-and-execution-costs.md).

# Transaction costs & Execution costs

**Transaction costs** are based on the cost of sending data to the blockchain. There are 4 items which make up the full transaction cost:

1. the base cost of a transaction (21000 gas)
2. the cost of a contract deployment (32000 gas)
3. the cost for every **zero byte** of data or code for a transaction.
4. the cost of every non-zero byte of data or code for a transaction.

**Execution costs** are based on the cost of computational operations which are executed as a result of the transaction.

You can see the breakdown in the yellow paper, Appendix G.

<figure><img src="https://1628544884-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTgomzlmn9NrxUY0OQ3cD%2Fuploads%2FEO7UUIk62GLLTCTIW4ka%2Fimage.png?alt=media&amp;token=dfd3f277-2f5e-4d5c-9b7a-8861fad69f47" alt=""><figcaption></figcaption></figure>

Link: <https://ethereum.stackexchange.com/questions/5812/what-is-the-difference-between-transaction-cost-and-execution-cost-in-remix>
