I want to calculate average gas price of several blocks (in Gwei), however I don't see how a field on blocks for gasPrice. Do I have to calculate it by grabbing the gasPrice of each transaction in each block and finding the average that way?

Also how would I calculate average block size (in mgas)?

  • Would a more expensive tx count more in your average calculations? Should it? Anyway, sorry, don't have a real answer for you. Jun 6, 2019 at 17:04

1 Answer 1


Yes. To get the average gas price for a group of blocks, you would have to grab the gas price of each transaction which makes up a block for all the blocks in your group.

To get the average block size of transactions, you would have to look at the amount of gas filled into a block by inspecting its gas usage and how many transactions that are included in the particular block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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