Ethereum Gas Fee Calculator

Enter Base Fee + Priority Fee.
Price of 1 ETH in $.

Transaction Type: ${escapeHTML(selectedTxType)}

`; detailsHTML += `

Gas Limit: ${formatNumber(gasLimit, 0)} units

`; detailsHTML += `

Gas Price: ${formatNumber(gasPriceGwei, 2)} Gwei

`; detailsHTML += `

ETH Price: $${formatNumber(ethPriceUSD, 2)} USD

`; detailsHTML += `
`; detailsHTML += `

Fee in Gwei: ${formatNumber(feeInGwei, 0)} Gwei

`; detailsHTML += `

Fee in ETH: ${formatGweiEth(feeInGwei)}

`; detailsHTML += `

Fee in USD: $${formatNumber(feeInUSD, 2)}

`; resultDetailsDiv.innerHTML = detailsHTML; resultsSection.style.display = 'block'; } function downloadResultsAsPDF() { const originalTitle = document.title; document.title = `Ethereum_Gas_Fee_Estimate_${new Date().toISOString().slice(0,10)}.pdf`; // Create a printable area const printArea = document.createElement('div'); printArea.classList.add('egfc-print-area'); // Clone title and results section for printing const toolTitleClone = document.querySelector('.egfc-tool-title').cloneNode(true); const resultsSectionClone = resultsSection.cloneNode(true); // Remove PDF button from cloned results for printing const pdfButtonInClone = resultsSectionClone.querySelector('#egfcDownloadPdfButton'); if (pdfButtonInClone && pdfButtonInClone.parentNode) { pdfButtonInClone.parentNode.removeChild(pdfButtonInClone); } printArea.appendChild(toolTitleClone); printArea.appendChild(resultsSectionClone); document.body.appendChild(printArea); window.print(); document.body.removeChild(printArea); // Clean up: remove the cloned printable area document.title = originalTitle; // Restore original title } });
Scroll to Top