1

This question already has an answer here:

What is the forumla used to calculate how much gas needs to be used? are the values just determined arbitrarily or was there some kind of benchmarking?

marked as duplicate by Richard Horrocks, Community Oct 28 '18 at 16:30

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.

1

The calculations for the original gas costs can be found in this spreadsheet. The costs are based on a weighted average of approximate costs (compute time, history size increase, state size increase). The results were then rounded off and tweaked somewhat arbitrarily based on perceived DoS vulnerability and frequency of use.

The current gas prices are slightly different, due to adjustments over time, such as in EIP 150.

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