{
  "$schema": "https://degreesofsatoshi.com/encyclopedia/schemas/article-v1.json",
  "schemaVersion": "1.0.0",
  "id": "wei-and-gwei",
  "canonical": "https://degreesofsatoshi.com/encyclopedia/wei-and-gwei/",
  "collection": "ethereum",
  "title": "Wei and gwei: converting Ethereum amounts and gas prices",
  "description": "Convert between wei, gwei and ETH and calculate an execution fee without confusing a gas price with the amount transferred.",
  "aliases": [],
  "dates": {
    "published": "2026-10-02",
    "modified": "2026-10-02",
    "verified": "2026-10-02T18:12:41.505Z",
    "dataAsOf": "2026-10-02"
  },
  "authorship": {
    "publisher": "Degrees of Satoshi editorial project",
    "process": "AI-assisted research and drafting with a separate automated source-verification pass; no external expert or named human review is implied."
  },
  "quickAnswer": {
    "text": "Wei is Ethereum’s smallest ETH denomination: one ETH is 10^18 wei. One gwei is 10^9 wei, so one ETH is one billion gwei. Gas prices are often quoted in gwei per gas; multiply by gas used to calculate the execution-gas fee, then convert the result into ETH.",
    "claimId": "wei-and-gwei-quick-answer",
    "sourceIds": [
      "eth-gas",
      "eth-accounts"
    ]
  },
  "keyFacts": [
    {
      "label": "Wei",
      "value": "1 ETH = 1,000,000,000,000,000,000 wei.",
      "sourceIds": [
        "eth-accounts"
      ],
      "id": "wei",
      "claimId": "wei-and-gwei-fact-wei"
    },
    {
      "label": "Gwei",
      "value": "1 gwei = 1,000,000,000 wei.",
      "sourceIds": [
        "eth-gas"
      ],
      "id": "gwei",
      "claimId": "wei-and-gwei-fact-gwei"
    },
    {
      "label": "Execution fee",
      "value": "Gas used × effective price per gas gives the execution-gas charge.",
      "sourceIds": [
        "eip1559",
        "eth-jsonrpc"
      ],
      "id": "execution-fee",
      "claimId": "wei-and-gwei-fact-execution-fee"
    }
  ],
  "prerequisites": [
    "ethereum-gas-fees"
  ],
  "sections": [
    {
      "id": "example",
      "heading": "Keep the units attached to each number",
      "sourceIds": [
        "eth-gas",
        "eip1559",
        "eth-jsonrpc"
      ],
      "paragraphs": [
        "An illustrative operation using 50,000 gas at 12 gwei per gas costs 600,000 gwei, or 0.0006 ETH, for execution gas. The transferred ETH value is a separate field and may be zero.",
        "The gas limit is a maximum allowance for work, not necessarily the gas actually consumed. Use the receipt’s actual gas used for an after-the-fact calculation."
      ]
    },
    {
      "id": "integers",
      "heading": "Use integer units when handling exact values",
      "sourceIds": [
        "eth-jsonrpc",
        "erc20"
      ],
      "paragraphs": [
        "RPC responses commonly encode quantities as hexadecimal integers. Software should preserve the integer value and apply the appropriate display scale instead of passing large wei values through an imprecise floating-point representation.",
        "ERC-20 tokens have their own decimals conventions. A token with six decimals does not become an 18-decimal asset merely because it runs on Ethereum."
      ]
    },
    {
      "id": "scope",
      "heading": "Execution gas is not every possible fee",
      "sourceIds": [
        "eip4844",
        "eth-gas",
        "optimism-fees"
      ],
      "paragraphs": [
        "A blob transaction has a separate blob-gas component. Rollup fees can also include components beyond the execution charge visible in a simple mainnet example.",
        "Name the fee component and network before comparing numbers. A bare “12 gwei” does not tell a reader the total amount paid."
      ]
    }
  ],
  "faq": [
    {
      "question": "Does a gas price of 20 gwei mean the transaction costs 20 gwei?",
      "answer": "No. That is a price per gas unit. The total execution-gas charge depends on how many gas units the transaction consumes and its effective price.",
      "sourceIds": [
        "eth-gas",
        "eip1559"
      ]
    }
  ],
  "claims": [
    {
      "id": "wei-and-gwei-quick-answer",
      "articleSlug": "wei-and-gwei",
      "statement": "Wei is Ethereum’s smallest ETH denomination: one ETH is 10^18 wei. One gwei is 10^9 wei, so one ETH is one billion gwei. Gas prices are often quoted in gwei per gas; multiply by gas used to calculate the execution-gas fee, then convert the result into ETH.",
      "sourceIds": [
        "source-5cadd0da692ffaa8",
        "source-2fb64d6fc5cedb00"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-5cadd0da692ffaa8",
          "locator": "What is gas?; Base fee; Priority fee"
        },
        {
          "sourceId": "source-2fb64d6fc5cedb00",
          "locator": "Account types; An account examined; Account creation"
        }
      ],
      "scope": {
        "collection": "ethereum",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T18:12:41.505Z",
        "reviewer": "Codex independent automated reviewer /root/verify_ethereum_100",
        "notes": [
          "Confirmed ETH/wei/gwei scaling and independently recomputed 50000 × 12 × 10^9 = 600000000000000 wei = 0.0006 ETH. RPC quantity integers and optional ERC-20 decimals remain distinct.",
          "Added receipt support to after-the-fact gasUsed calculation and Optimism support to the additional rollup-fee qualification. No live fee quote or total-cost guarantee is given."
        ]
      }
    },
    {
      "id": "wei-and-gwei-fact-wei",
      "articleSlug": "wei-and-gwei",
      "statement": "Wei: 1 ETH = 1,000,000,000,000,000,000 wei.",
      "sourceIds": [
        "source-2fb64d6fc5cedb00"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-2fb64d6fc5cedb00",
          "locator": "Account types; An account examined; Account creation"
        }
      ],
      "scope": {
        "collection": "ethereum",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T18:12:41.505Z",
        "reviewer": "Codex independent automated reviewer /root/verify_ethereum_100",
        "notes": [
          "Confirmed ETH/wei/gwei scaling and independently recomputed 50000 × 12 × 10^9 = 600000000000000 wei = 0.0006 ETH. RPC quantity integers and optional ERC-20 decimals remain distinct.",
          "Added receipt support to after-the-fact gasUsed calculation and Optimism support to the additional rollup-fee qualification. No live fee quote or total-cost guarantee is given."
        ]
      }
    },
    {
      "id": "wei-and-gwei-fact-gwei",
      "articleSlug": "wei-and-gwei",
      "statement": "Gwei: 1 gwei = 1,000,000,000 wei.",
      "sourceIds": [
        "source-5cadd0da692ffaa8"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-5cadd0da692ffaa8",
          "locator": "What is gas?; Base fee; Priority fee"
        }
      ],
      "scope": {
        "collection": "ethereum",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T18:12:41.505Z",
        "reviewer": "Codex independent automated reviewer /root/verify_ethereum_100",
        "notes": [
          "Confirmed ETH/wei/gwei scaling and independently recomputed 50000 × 12 × 10^9 = 600000000000000 wei = 0.0006 ETH. RPC quantity integers and optional ERC-20 decimals remain distinct.",
          "Added receipt support to after-the-fact gasUsed calculation and Optimism support to the additional rollup-fee qualification. No live fee quote or total-cost guarantee is given."
        ]
      }
    },
    {
      "id": "wei-and-gwei-fact-execution-fee",
      "articleSlug": "wei-and-gwei",
      "statement": "Execution fee: Gas used × effective price per gas gives the execution-gas charge.",
      "sourceIds": [
        "source-2be2a692f09f4d89",
        "source-a5154b4118a3d15f"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-2be2a692f09f4d89",
          "locator": "Specification"
        },
        {
          "sourceId": "source-a5154b4118a3d15f",
          "locator": "eth_getTransactionByHash; eth_getTransactionReceipt; eth_call; eth_getLogs; eth_getCode; eth_estimateGas; eth_getBalance; eth_getStorageAt; eth_getTransactionCount; default block parameter"
        }
      ],
      "scope": {
        "collection": "ethereum",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T18:12:41.505Z",
        "reviewer": "Codex independent automated reviewer /root/verify_ethereum_100",
        "notes": [
          "Confirmed ETH/wei/gwei scaling and independently recomputed 50000 × 12 × 10^9 = 600000000000000 wei = 0.0006 ETH. RPC quantity integers and optional ERC-20 decimals remain distinct.",
          "Added receipt support to after-the-fact gasUsed calculation and Optimism support to the additional rollup-fee qualification. No live fee quote or total-cost guarantee is given."
        ]
      }
    }
  ],
  "sources": [
    {
      "id": "eth-gas",
      "label": "Gas and fees",
      "publisher": "ethereum.org contributors",
      "url": "https://ethereum.org/en/developers/docs/gas/",
      "locator": "What is gas?; Base fee; Priority fee",
      "note": "Execution resource units, fee components and gas expenditure.",
      "version": null,
      "checkedAt": "2026-10-02T17:03:41.688Z",
      "contentSha256": "566e61b7dce594a477ef28bab1f5a23279feb4f782e2838623fc7491c9daec66",
      "recordId": "source-5cadd0da692ffaa8"
    },
    {
      "id": "eth-accounts",
      "label": "Ethereum accounts",
      "publisher": "ethereum.org contributors",
      "url": "https://ethereum.org/en/developers/docs/accounts/",
      "locator": "Account types; An account examined; Account creation",
      "note": "Key-controlled and code-controlled accounts, balances, nonces and storage.",
      "version": null,
      "checkedAt": "2026-10-02T17:03:41.958Z",
      "contentSha256": "262a5694899ae6f774aacae66b13d6929b658ecc9e23c276af9e23ee9455f034",
      "recordId": "source-2fb64d6fc5cedb00"
    },
    {
      "id": "eip1559",
      "label": "Fee market change for ETH 1.0 chain",
      "publisher": "Ethereum Improvement Proposals",
      "url": "https://eips.ethereum.org/EIPS/eip-1559",
      "locator": "Specification",
      "note": "Base fees, fee caps, priority fees and effective transaction gas price.",
      "version": "EIP/ERC-1559; retrieved document hash recorded",
      "checkedAt": "2026-10-02T17:03:42.151Z",
      "contentSha256": "453b293845f8faac282a468be0c01594f0a785dde3af34947ee676c085e011b7",
      "recordId": "source-2be2a692f09f4d89"
    },
    {
      "id": "eth-jsonrpc",
      "label": "Ethereum JSON-RPC",
      "publisher": "ethereum.org contributors",
      "url": "https://ethereum.org/en/developers/docs/apis/json-rpc/",
      "locator": "eth_getTransactionByHash; eth_getTransactionReceipt; eth_call; eth_getLogs; eth_getCode; eth_estimateGas; eth_getBalance; eth_getStorageAt; eth_getTransactionCount; default block parameter",
      "note": "RPC response fields, transaction receipts, call simulation and log filtering.",
      "version": null,
      "checkedAt": "2026-10-02T17:03:42.060Z",
      "contentSha256": "ed13997ec4f415dff80883add0730d4e64bcc8c17b95dd4f6c27aed0241a4073",
      "recordId": "source-a5154b4118a3d15f"
    },
    {
      "id": "erc20",
      "label": "ERC-20 Token Standard",
      "publisher": "Ethereum Improvement Proposals",
      "url": "https://eips.ethereum.org/EIPS/eip-20",
      "locator": "totalSupply; balanceOf; transfer; decimals; approve; allowance; transferFrom; Transfer",
      "note": "Token supply, displayed units and balance accounting.",
      "version": "ERC-20",
      "checkedAt": "2026-10-02T17:03:45.826Z",
      "contentSha256": "98bda5e4707841a68684879878c4c165fdaa47d89ed69ebf232ab9be06ff050e",
      "recordId": "source-ac4ad503a55127bb"
    },
    {
      "id": "eip4844",
      "label": "Shard Blob Transactions",
      "publisher": "Ethereum Improvement Proposals",
      "url": "https://eips.ethereum.org/EIPS/eip-4844",
      "locator": "Gas accounting; Opcode to get versioned hashes; Point evaluation precompile; Consensus layer validation",
      "note": "Blob commitments, separate blob-gas fee calculations and temporary data availability.",
      "version": "EIP/ERC-4844; retrieved document hash recorded",
      "checkedAt": "2026-10-02T17:03:42.506Z",
      "contentSha256": "d1c1eb7c505919bb326f493d163b9200b72ed0de2416deae37db6d75cc07baa5",
      "recordId": "source-f8f55ea8fe5a54a7"
    },
    {
      "id": "optimism-fees",
      "label": "OP Stack transaction fees",
      "publisher": "Optimism",
      "url": "https://docs.optimism.io/stack/transactions/fees",
      "locator": "Gas fee components; Execution gas fee; L1 data fee; Operator fee",
      "note": "Rollup execution, data-publication and operator fee components depend on active network upgrades.",
      "version": null,
      "checkedAt": "2026-10-02T17:55:17.901Z",
      "contentSha256": "99d0390b07f64df31a092d5daedf00c7aecc718e5e5601e5b70f9935fa1dc043",
      "recordId": "source-06697b48df70893b"
    }
  ],
  "related": {
    "articles": [
      "ethereum-transaction-receipts",
      "ethereum-blob-fees",
      "erc-20-tokens"
    ],
    "dossiers": [],
    "wallets": []
  },
  "revisionHistory": [
    {
      "date": "2026-10-02",
      "kind": "published",
      "summary": "First publication after primary-source research and independent automated verification."
    }
  ],
  "citation": "Degrees of Satoshi editorial project. “Wei and gwei: converting Ethereum amounts and gas prices.” Published 2026-10-02; updated 2026-10-02. https://degreesofsatoshi.com/encyclopedia/wei-and-gwei/"
}
