This question already has an answer here:

Is there somewhere a list showing the different cost of different calculations?
For example:

  • Perform transaction: 21'000 gas
  • calculate a hash: 30 gas
  • addition of two numbers: 3 gas
  • cycle in a loop: 1 gas
  • ...

marked as duplicate by Richard Horrocks, Rob Hitchens - B9lab, eth Jun 25 '17 at 21:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Take a look to http://ethdocs.org/en/latest/contracts-and-transactions/account-types-gas-and-transactions.html.

Also, check the following spreadsheet: https://docs.google.com/spreadsheets/d/1m89CVujrQe5LAFJ8-YAUCcNK950dUzMQPMJBxRtGCqs/edit

  • You might also want to check out this thread. – Paul Berg Jul 23 at 0:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.