Using the Gas Fee Calculator
The Gas Fee Calculator turns gas units, a gwei price, and a coin price into a fee. Coins are the gas times the gwei price, divided by 1000000000. The fee is that coin amount times the coin price. The sample gas is 21000, the sample gwei price is 20, and the sample coin price is 2000. Choose Estimate the fee. The headline is 0.84, and the label above it reads Fee. The sentence under the headline says 21000 gas at 20 gwei and a coin price of 2000 is a fee of 0.84. The detail lines are Coins 0.00042 and Fee 0.84. The coin line is 21000 times 20, divided by 1000000000. The fee is 0.00042 times 2000. The page does not look up a network fee.
The gas units must be greater than 0. The gwei price may be 0. The coin price may be 0. A gwei price of 0 makes the coin amount 0 and the fee 0. A coin price of 0 leaves the coin amount at 0.00042 for the sample gas and gwei, and the fee is 0 because that amount is multiplied by 0. Gas of 0 is rejected before a fee is shown. Each field must be at most 100000000000. The divisor 1000000000 is fixed. It is not a field you can edit.
A blank field is rejected. A value that is not a plain decimal is rejected with the required message for that field, including a number written with a leading minus. A number above the cap is rejected with the range message for that field. The sample sits inside the bounds, which is why 21000, 20, and 2000 produce coins of 0.00042 and a fee of 0.84 on every repeat. The page does not replace 20 with a gwei price from a network, and it does not replace 2000 with a market price.
Keep the three inputs with both result lines. A note that says only 0.84 can be this sample or another gas count, gwei price, and coin price that happens to land on 0.84. The check for this page is specific. 21000 gas at 20 gwei is 0.00042 coins, and a coin price of 2000 makes the fee 0.84. The page will compute whatever three accepted numbers you type, and it will not look up a network fee. Double the gas to 42000, leave the gwei price at 20, and leave the coin price at 2000. The coins become 0.00084 and the fee becomes 1.68, because the gas doubled. Half the gwei price, with gas back at 21000 and the coin price at 2000, is coins of 0.00021 and a fee of 0.42.
What the Fee Figure Includes
The fee is one number built in two steps. First the gas times the gwei price is divided by 1000000000. That quotient is the coin amount. For 21000 and 20, 21000 times 20 is 420000, and 420000 divided by 1000000000 is 0.00042. Then the coin amount times the coin price is the fee. For a coin price of 2000, 0.00042 times 2000 is 0.84. The detail lines follow that order: Coins, then Fee. The headline is the fee.
The coin line is there so you can see the division before the coin price is applied. If you change only the coin price, the coins stay 0.00042 on the sample gas and gwei, and the fee moves. If you change the gas or the gwei price, the coin line moves, and the fee moves with it. The page does not look up a network fee for either step. 21000, 20, and 2000 are the numbers you typed.
How 21000 at 20 Gwei Becomes 0.84
Enter gas 21000, gwei 20, and a coin price of 2000. The coins are 0.00042 and the fee is 0.84. Run the same three numbers again. Both lines stay 0.00042 and 0.84. Change only the coin price to 1000. The coins stay 0.00042, and the fee is 0.42, because 0.00042 times 1000 is 0.42. Change the coin price to 0. The coins stay 0.00042, and the fee is 0. Change the gwei price to 0 and the coin price back to 2000. The coins are 0 and the fee is 0. Change the gas to 42000, the gwei price to 20, and the coin price to 2000. The coins are 0.00084 and the fee is 1.68, because the gas doubled and the other two inputs did not. Gas must be greater than 0.
A buy price and a sell price are a different product. The Crypto Profit Calculator subtracts the buy price from the sell price and multiplies by the quantity. Buying 2 coins at 10 and selling at 15 is a profit of 10. That page does not look up a market price, and it does not divide gas by 1000000000. Use it when you want that profit. Use this page when you want the fee from gas, gwei, and a coin price.
What the Page Does Not Look Up
The page does not look up a network fee. It does not read a pending transaction, a block, or a coin name. The fee of 0.84 is 21000 times 20, divided by 1000000000, times 2000. The divisor stays 1000000000 on every run. A gwei price you type is used even if a network would quote a different one. A coin price you type is used even if a market would quote a different one. If you want those outside numbers, type them into the fields. The page will not fetch them.
The page does not add a second fee on top of the headline. There is no tip field and no flat surcharge. A gwei price of 0 and a coin price of 0 are allowed, and each of them can make the fee 0 for a different reason. Gas of 0 is not allowed. Nothing in the headline is a statement that a network charged 0.84. The three numbers are the ones you typed.
The Sample That Finishes at 0.84
Leave the fields on the sample and choose Estimate the fee. The headline is 0.84. The coin line is 0.00042. The sentence names 21000 gas, 20 gwei, a coin price of 2000, and a fee of 0.84. Change the gwei price to 10 and leave the gas at 21000 and the coin price at 2000. The coins are 0.00021 and the fee is 0.42, because the gwei price is half of 20 and the other inputs are unchanged. Change the gwei price back to 20 and the coin price to 0. The coins return to 0.00042 and the fee is 0. A coin price of 0 is allowed. Gas of 21000 is used because you left it in the field.
A road trip from miles and a gallon price is a different product. The Fuel Cost Calculator estimates fuel cost from distance, economy, and a price per gallon. 100 miles at 25 miles per gallon and 3.5 per gallon is 14. That page uses the numbers you type. It does not divide by 1000000000, and it does not return 0.84. Use it when you want that fuel figure. Use this page when you want gas times gwei, divided by 1000000000, times the coin price.
Gas, Gwei, and the Fixed Divisor
Gas units must be greater than 0 and at most 100000000000. Gas of 0 is rejected with Gas units must be greater than 0 and at most 100000000000. The gwei price must be at least 0 and at most 100000000000, so 0 is allowed. The coin price uses those same bounds, so 0 is allowed. A blank gas field is rejected with Gas units is required. A blank gwei price is rejected with Gwei price is required. A blank coin price is rejected with Coin price is required. A leading minus is not a plain decimal, so it is rejected with the required message for that field.
The divisor is always 1000000000. The page does not accept a different scale. Once the three numbers are accepted, the coins are gas times gwei divided by that constant, and the fee is the coins times the coin price. The page does not look up a network fee if the gas seems large. 21000, 20, and 2000 are used because you entered them. The same three values always rebuild coins of 0.00042 and a fee of 0.84.
Mistakes That Skip the Division
The usual miss is to multiply 21000 by 20 by 2000 and skip the division by 1000000000. That product is not the fee. The page divides 420000 by 1000000000 to reach 0.00042 coins, then multiplies by 2000 to reach 0.84. Another miss is to treat a coin price of 0 as a blank. A coin price of 0 is allowed, and the fee is 0 while the coin line can still show 0.00042. Another miss is to enter gas of 0 and expect a fee of 0. Gas must be greater than 0. Another miss is to expect a network quote when the gwei field is blank. The page does not look up a network fee. A blank field is rejected.
A share trade with commissions is a different subtraction. The Stock Profit Calculator multiplies a price gap by the shares and then subtracts commissions. Buying at 10 and selling at 15, for 100 shares and no commission, is a profit of 500. That page does not look up a quote, and it does not return 0.84 for a gas fee. Use it when you want that share profit. Use this page when you want the fee from gas, gwei, and a coin price.
Rebuilding 0.00042 and 0.84
Enter gas 21000, gwei 20, and coin price 2000. Confirm the coins are 0.00042 and the fee is 0.84. Enter the same three numbers again and confirm both lines repeat. Change the coin price to 1000 and confirm the fee is 0.42 while the coins stay 0.00042. Change the coin price to 0 and confirm the fee is 0 while the coins stay 0.00042. Set the coin price back to 2000 and the gwei price to 10. Confirm the coins are 0.00021 and the fee is 0.42. Set the gwei price to 0. Confirm both lines are 0. Restore 20 and 2000.
Enter gas of 0 and confirm it is rejected. Clear the gwei price and confirm it is rejected. Enter a coin price above 100000000000 and confirm it is rejected. Restore 21000, 20, and 2000. The headline must read 0.84, with coins of 0.00042, before you treat the run as the sample again. The page does not look up a network fee on any of these runs. The divisor stays 1000000000.
Saving the Three Inputs With the Fee
Write the gas, the gwei price, the coin price, the coins, and the fee in one note. For the sample the note is gas 21000, gwei 20, coin price 2000, coins 0.00042, fee 0.84. Include the divisor 1000000000 so a later check does not skip it. If the fee was 0, write whether the gwei price was 0 or the coin price was 0, because those two zeros leave a different coin line. Do not describe 0.84 as a fee a network quoted. The page will still compute whatever three numbers you type.
A ratio of gain to cost is a different division. The ROI Calculator subtracts the cost from the gain and divides by the cost. A gain of 150 and a cost of 100 is 0.5, or 50 percent. That page does not read an account, and it does not divide gas units by 1000000000. Use it when you want that ratio. Use this page when you want the fee from gas, gwei, and a coin price.
A Fee From Numbers You Typed
The headline is the coin amount times the coin price. The coin amount is gas times gwei, divided by 1000000000. The sample is coins 0.00042 and fee 0.84. The page does not look up a network fee, and it does not look up a coin price. Gas must be greater than 0. A gwei price of 0 and a coin price of 0 are allowed and can make the fee 0. The divisor does not change.
Checking Both Lines Before You Keep Them
Start with the known run. 21000 gas at 20 gwei and a coin price of 2000 should be coins of 0.00042 and a fee of 0.84. Half the coin price should change only the fee, from 0.84 to 0.42. A coin price of 0 should leave the coins at 0.00042 and the fee at 0. A gwei price of 0 should make both lines 0. Gas of 0 should be rejected. If the fee is 21000 times 20 times 2000, the division by 1000000000 was skipped, and that is not this formula. The page does not look up a network fee for any of these checks.
A weight charge plus a handling fee is a different sum. The Shipping Cost Calculator multiplies weight by a rate and adds a handling fee. Weight 5 at rate 2, plus handling 3, is 13. That page uses the rate you type. It does not divide by 1000000000, and it does not return 0.84. Use it when you want that shipping total. Use this page when you want the gas fee.