Skip to main content

Solana Transaction Cost Calculator

Calculate Solana transaction costs from compute units and priority fees. Enter values for instant results with step-by-step formulas.

Share this calculator

Formula

Total Fee = Base Fee (0.000005 SOL) + (Priority Fee Rate x Compute Units) / 10^15

The base fee is a fixed 5,000 lamports (0.000005 SOL) per signature. The priority fee is computed by multiplying the micro-lamport rate per compute unit by total compute units consumed, then converting from micro-lamports to SOL by dividing by 10^15. Priority fees incentivize validators to process your transaction faster.

Worked Examples

Example 1: DeFi Swap During High Demand

Problem: You want to execute a DEX swap using 600,000 compute units with a priority fee of 50,000 micro-lamports/CU. SOL price is $150.

Solution: Base fee = 0.000005 SOL\nPriority fee = (50,000 x 600,000) / 10^15 = 0.00003 SOL\nTotal fee = 0.000005 + 0.00003 = 0.000035 SOL\nUSD cost = 0.000035 x $150 = $0.00525\nComparable Ethereum swap: ~$5-50

Result: Total cost: 0.000035 SOL ($0.00525) | 99% cheaper than Ethereum L1

Example 2: Bot Running 1000 Transactions Daily

Problem: A trading bot executes 1,000 simple transfers daily (200,000 CU each) with 10,000 micro-lamports/CU priority fee. SOL at $150.

Solution: Per tx: Base = 0.000005 + Priority = (10,000 x 200,000)/10^15 = 0.000002 SOL\nTotal per tx = 0.000007 SOL = $0.00105\nDaily: 1,000 x $0.00105 = $1.05\nMonthly: $31.50\nAnnual: $383.25

Result: Daily cost: $1.05 | Monthly: $31.50 | Annual: $383.25 for 365,000 transactions

Frequently Asked Questions

How are Solana transaction fees calculated?

Solana transaction fees consist of two components: a base fee and an optional priority fee. The base fee is a fixed 5,000 lamports (0.000005 SOL) per signature, which is required for every transaction. The priority fee is calculated by multiplying the compute unit price (in micro-lamports per compute unit) by the number of compute units consumed. This priority fee is optional but increasingly necessary during periods of high network demand. Validators prioritize transactions with higher priority fees, similar to how Ethereum gas works but at drastically lower cost levels. The total fee formula is: Total Fee = Base Fee + (Priority Fee Rate x Compute Units Used).

What are compute units on Solana and why do they matter?

Compute units are Solana measurement of computational work required to process a transaction. Every instruction in a transaction consumes a certain number of compute units. A simple SOL transfer uses approximately 200,000 compute units, while a complex DeFi swap might use 600,000 or more. Each transaction has a default budget of 200,000 compute units but can request up to 1.4 million compute units. If a transaction exceeds its compute unit budget, it fails and the fee is still charged. Understanding compute unit consumption helps optimize transaction costs by setting appropriate compute unit limits and avoiding overpaying for priority fees on simple transactions.

How do priority fees affect transaction confirmation speed?

Priority fees directly influence how quickly validators include your transaction in a block. During normal network conditions, the base fee alone is sufficient for fast confirmation within 400 milliseconds. However, during periods of high demand such as popular NFT mints or token launches, transactions without priority fees may be delayed or dropped entirely. Setting a competitive priority fee ensures your transaction is prioritized by validators. The optimal priority fee varies by network conditions and can be determined using Solana RPC methods like getRecentPrioritizationFees. Most wallets and dApps now include automatic priority fee estimation to help users set appropriate levels.

How does Solana fee structure compare to Ethereum?

Solana fees are dramatically lower than Ethereum Layer 1 fees. A simple Ethereum transfer costs approximately $0.50-5.00 in gas fees during normal conditions, while the same transfer on Solana costs approximately $0.00001-0.001. For complex DeFi operations, Ethereum can charge $20-200 in gas, whereas Solana typically costs $0.001-0.01. However, Ethereum Layer 2 solutions like Arbitrum and Optimism have reduced the gap significantly, offering fees of $0.01-0.50. The key architectural difference is that Solana processes transactions in parallel using its Sealevel runtime, while Ethereum processes sequentially. This parallelism allows Solana to maintain low fees even at high throughput of 400-65,000 transactions per second.

What factors cause Solana transaction fees to fluctuate?

While Solana base fees are fixed, effective transaction costs fluctuate due to several factors. Priority fee markets are the primary driver of cost variation, with fees spiking during popular mints, token launches, or market volatility. Network congestion can also cause transactions to fail, wasting the base fee. The SOL token price directly affects USD-denominated costs even when SOL-denominated fees remain constant. Compute unit consumption varies by transaction complexity with complex DeFi interactions and cross-program invocations using more compute units. Additionally, some programs charge their own fees on top of network transaction fees, and rent costs for account storage add to the total cost of deploying contracts or creating new accounts.

What is the rent mechanism on Solana and how does it affect costs?

Solana uses a rent system to manage on-chain data storage costs. Every account that stores data on Solana must maintain a minimum SOL balance proportional to the space it occupies. This is called rent-exemption and currently requires approximately 0.00089 SOL per byte of data stored. For a standard token account (165 bytes), the rent-exempt minimum is about 0.00203928 SOL. When creating new accounts, SPL tokens, or NFTs, users must fund these rent deposits in addition to transaction fees. The good news is that rent deposits are fully refundable when accounts are closed. This mechanism prevents state bloat by ensuring that unused accounts can be reclaimed over time.

References