Hedera Processes Thousands of Transactions Per Second… See… | Hedera Hedera Network Services Token Service Mint and configure tokens and accounts. Consensus Service Verifiable timestamps and ordering of events. Smart Contracts Run Solidity smart contracts. HBAR The Hedera network's native cryptocurrency. Insights How It Works Learn about Hedera from end to end. Explorers View live and historical data on Hedera. Dashboards Analyze network activity and metrics. Network Nodes Understand networks and node types. Devs Start Building Get Started Learn core concepts and build the future. Documentation Review the API and build using your favorite language. Developer Resources Integrations Plugins and microservices for Hedera. Fee Estimator Understand and estimate transaction costs. Open Source Hedera is committed to open, transparent code. Learning Center Learn about web3 and blockchain technologies. Grants Grants & accelerators for your project. Bounties Find bugs. Submit a report. Earn rewards. Ecosystem ECOSYSTEM Hedera Ecosystem Applications, developer tools, network explorers, and more. NFT Ecosystem Metrics Analyze on-chain and market NFT ecosystem metrics. CATEGORIES Web3 Applications Connect into the innovative startups decentralizing the web on Hedera. Enterprise Applications Learn about the Fortune 500 companies decentralizing the web on Hedera. Wallets & Custodians Create a Hedera account to manage HBAR, fungible tokens, and NFTs. Network Explorers Hedera mainnet and testnet graphical network explorers. Developer Tooling Third-party APIs, integrations, and plugins to build apps on Hedera. Grants & Accelerators Boost your project with support from the Hedera ecosystem. Partner Program Explore our partners to bring your vision into reality. Hedera Council Over 30 highly diversified organizations govern Hedera. Use Cases Hedera Solutions Asset Tokenization Studio Open source toolkit for tokenizing assets securely. Stablecoin Studio All-in-one toolkit for stablecoin solutions. Hedera Guardian Auditable carbon markets and traceability. Functional Use Cases Data Integrity & AI Reliable, secure, and ethically governed insights. Sustainability Enabling fair carbon markets with trust. Real-World Asset Tokenization Seamless tokenization of real-world assets and digital at scale. Consumer Engagement & Loyalty Mint, distribute, and redeem loyalty rewards. Decentralized Identity Maintain the lifecycle of credentials. Decentralized Logs Scalable, real-time timestamped events. DeFi Dapps built for the next-generation of finance. NFTs Low, fixed fees. Immutable royalties. Payments Scalable, real-time, and affordable crypto-payments. HBAR Overview Learn about Hedera's token, HBAR. Treasury Management Hedera’s report of the HBAR supply. Governance Decentralized Governance Hedera Council See the world's leading organizations that own Hedera. About Meet Hedera's Board of Directors and team. Journey Watch Hedera's journey to build an empowered digital future for all. Transparent Governance Public Policy Hedera's mission is to inform policy and regulation that impact the industry. Meeting Minutes Immutably recorded on Hedera. Roadmap Follow Hedera's roadmap in its journey to build the future. Resources Company What's New Partners Papers Careers Media Blog Technical Press Podcast Community Events Meetups Store Brand Navigation QUICKSTART Hedera Processes Thousands of Transactions Per Second… See How that Number is Calculated technical Nov 01, 2023 by Ed Marquez Head of Developer Relations At the time of this writing (November 2nd, 2023), the Arkhia Metrics site shows that the Hedera mainnet is processing 2,443 transactions per second (TPS), with more than 26 billion total transactions to date. The article Does Hedera’s TPS Include Transactions Generated by its Consensus Algorithm? Spoiler alert: NO states that the publicly reported transaction count on Hedera does not include the intra-node gossip communication needed to reach consensus. Only transactions submitted and paid for by external parties are included in the TPS count. But, how is that number calculated? For the curious minds out there, this article shows how anyone can calculate TPS on Hedera. It provides Python and JavaScript code that you can use to find the latest TPS number. The goal is to highlight how everyone can benefit from the transparency on-chain data provides. If you are interested in seeing how Hedera's latest TPS compares to that of other Layer 1 and Layer 2 networks, see the Chainspect TPS Dashboard. As you read the article, keep in mind the equation below. Now, let’s do some fun math! TPS = Transactions in X Blocks (#) / Duration of X Blocks (seconds) 1. Fetching the Block Data As explained in the glossary of the Hedera Documentation, a block is simply a batch of transactions. Hedera’s hashgraph consensus algorithm inherently doesn't utilize blocks. However, to enhance compatibility with Ethereum Virtual Machine (EVM) tools and systems, the notion of "virtual blocks" was integrated on Hedera with HIP-415. Each block on Hedera represents transactions processed in a time window of approximately 2 seconds.  The script uses the mirror node REST API to obtain the data for the last five blocks, providing a snapshot of roughly 10 seconds. You can modify the script to take as many blocks as you like. Here's how to fetch the data: Python Python JavaScript import requests def get_transactions_per_second(): # Each block on Hedera is approximately 2 seconds numBlocks = 5 # Use the mirror node REST API to get info from the last 5 blocks blocks_url = f"https://mainnet-public.mirrornode.hedera.com/api/v1/blocks?limit={numBlocks}" response = requests.get(blocks_url) const axios = require("axios"); async function getTransactionsPerSecond() { // Each block on Hedera is approximately 2 seconds const numBlocks = 5; // Use the mirror node REST API to get info from the last 5 blocks const blocksUrl = `https://mainnet-public.mirrornode.hedera.com/api/v1/blocks?limit=${numBlocks}`; const response = await axios.get(blocksUrl); Here’s a sample of the data that a query returns for a block: { "blocks": [ { "count": 3628, "hapi_version": "0.40.0", "hash": "0x307f22d2fcdfa56925ac2288a639efceb4aae005ff8c9e961ff3ce6141ed1f18c780116b98bdf7ddcdbaa0087cb2449e", "name": "2023-10-20T15_37_40.009866397Z.rcd.gz", "number": 54899144, "previous_hash": "0x72412103ff7a3823bebbe913a1cd0b2de0c835a936ccd26ed2a1db2a75f0119503fe0517d0bbe322e3264c340e3ac799", "size": 887005, "timestamp": { "from": "1697816260.009866397", "to": "1697816261.999298266" }, "gas_used": 0, "logs_bloom": "0x" } ], "links": { "next": "/api/v1/blocks?limit=1&block.number=lt:54899144" } } Copy You can also see detailed information about blocks from a Hedera network explorer, like HashScan. 2. Adding Up the Transactions Next, we need to find the total number of transactions processed over these five blocks. This is a straightforward process: loop through each block and keep a running tally of the transaction counts. Here’s the code that achieves this: Python Python JavaScript # Add up the transactions from each block blocks = response.json()['blocks'] sum_of_transactions = sum(block['count'] for block in blocks) // Add up the transactions from each block const blocks = response.data["blocks"]; const sumOfTransactions = blocks.reduce((acc, block) => acc + block["count"], 0); 3. Calculating the Duration of the Time Window We also need to determine the exact duration these five blocks took. Remember, while each block takes approximately 2 seconds, the actual duration might vary slightly. Keep in mind that each block also has a starting and ending timestamp. We calculate the total duration of the time window by subtracting the starting timestamp of the oldest block from the ending timestamp of the newest block: Python Python JavaScript # Calculate the duration of the 5 blocks from the timestamps of the first and last blocks newest_block_to_timestamp = float(blocks[0]['timestamp']['to']) oldest_block_from_timestamp = float(blocks[-1]['timestamp']['from']) duration = newest_block_to_timestamp - oldest_block_from_timestamp // Calculate the duration of the 5 blocks from the timestamps of the first and last blocks const newestBlockToTimestamp = parseFloat(blocks[0]["timestamp"]["to"]); const oldestBlockFromTimestamp = parseFloat(blocks[blocks.length - 1]["timestamp"]["from"]); const duration = newestBlockToTimestamp - oldestBlockFromTimestamp; 4. Calculating TPS 🎉🎉 With the total number of transactions and the exact duration, it’s time for the grand reveal. The final step is the easiest. We simply divide the total number of transactions by the duration (in seconds) to get the TPS number: Python Python JavaScript # Calculate the transactions per second transactions_per_second = sum_of_transactions / duration return transactions_per_second TPS = get_transactions_per_second() print(f"Hedera TPS:", TPS) // Calculate the transactions per second const transactionsPerSecond = sumOfTransactions / duration; return transactionsPerSecond; } (async () => { const TPS = await getTransactionsPerSecond(); console.log(`Hedera TPS: ${TPS}`); })(); To see the fruits of your labor, just run the scripts! Python hedera-tps-calculator-python 💻 Quickly run the Python example in your browser JavaScript hedera-tps-calculator-js 💻 Quickly run the JS example in your browser 5. Wrapping Up You learned how to easily calculate TPS on Hedera with just a few lines of code. Whether you're tracking performance, doing research, or satisfying your curiosity, this process shows how everyone can benefit from the transparency that on-chain data provides. Happy coding! Continue Learning Open a Testnet Account Try Examples and Tutorials Join the Developer Discord Explore the Learning Center Read the Hedera Blog Share This Back to blog What is gRPC, gRPC-Web, and Proxies? Ed Marquez Pragmatic Blockchain Design Patterns – Integrating Blockchain into Business Processes Michiel Mulders Zero Cost EthereumTransaction on Success: Hedera's New Fee Model for Relay Operators Oliver Thorn Hedera Adopts Chainlink Standard for Cross-Chain Interoperability To Accelerate Ecosystem Adoption Hedera Team Hedera Developer Highlights March 2025 Michiel Mulders Hedera Release Cycle Overview Ed Marquez View All Posts Sign up for the newsletter CONNECT WITH US Transparency Open Source Audits & Standards Sustainability Commitment Carbon Offsets Governance Hedera Council Public Policy Treasury Management Meeting Minutes LLC Agreement Node Requirements Community Events Meetups HBAR Telegram Developer Discord Twitter Community Support FAQ Network Status Developer Discord StackOverflow Brand Brand Guidelines Built on Hedera Logo Hedera Store About Team Partners Journey Roadmap Careers Contact General Inquiry Public Relations © 2018-2025 Hedera Hashgraph, LLC. All trademarks and company names are the property of their respective owners. All rights in the Deutsche Telekom mark are protected by Deutsche Telekom AG. All rights reserved. Hedera uses the third party marks with permission. Terms of Use  |  Privacy Policy