Solana Compute Unit & Priority Fee Estimator

Estimate Solana transaction compute units and the optimal priority fee

Enter the instruction types in your Solana transaction (SOL transfer, token transfer, NFT mint, swap, account creation) to estimate the compute units consumed, then pick a priority-fee tier to compute the total cost in lamports, SOL, and USD at your entered SOL price. Runs in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

How are compute units estimated?

Each instruction type has a typical compute-unit cost: a simple SOL transfer is around 300 CU, an SPL token transfer around 4,500 CU, an account creation around 3,000 CU, an NFT mint around 30,000 CU, and a DEX swap around 60,000 CU. The tool sums your instruction counts to estimate the transaction's total CU usage.

Solana fees have two parts: a tiny flat base fee per signature and an optional priority fee that bids for faster inclusion. This estimator adds up the compute units your instructions consume and prices the priority fee so you can see the real cost in lamports, SOL, and dollars before you send.

How it works

Total compute units come from summing per-instruction estimates. The fee is then:

base_fee     = 5,000 lamports × signatures
priority_fee = compute_units × micro_lamports_per_CU / 1,000,000
total        = base_fee + priority_fee   (lamports)
SOL          = total / 1,000,000,000
USD          = SOL × sol_price

Per-instruction CU estimates: SOL transfer ≈ 300, token transfer ≈ 4,500, account creation ≈ 3,000, NFT mint ≈ 30,000, swap ≈ 60,000.

Understanding Solana’s fee model

Solana’s fee architecture differs from Ethereum’s gas model in an important way. The base fee (5,000 lamports per signature) is fixed and tiny — it is a spam-deterrent, not a revenue mechanism. The priority fee is where market-based congestion pricing happens. During high-demand periods (popular NFT mints, volatile DeFi markets), priority fees can spike dramatically, and a transaction with zero priority fee may simply not be processed until congestion clears.

The compute unit limit is a separate setting. Each transaction has a default compute budget, but you should explicitly set it using a ComputeBudgetInstruction to the value you actually need plus a small buffer (10–15% is common). Setting it too low causes the transaction to fail when it runs out of compute mid-execution. Setting it too high wastes lamports on unused capacity.

Compute unit reference by instruction type

Instruction typeTypical CUNotes
SOL transfer~300System program transfer — very cheap
SPL token transfer~4,500Account checks and balance updates
Account creation (init)~3,000Allocating rent-exempt space
NFT mint~25,000–35,000Varies by standard (Metaplex, Token-2022)
DEX swap~50,000–80,000Highly variable by AMM implementation
Compressed NFT mint~10,000–15,000State compression reduces CU vs standard NFT

These are planning figures. Real CU consumption varies with account state, program version, and remaining budget at the point the instruction executes.

Worked example

A transaction doing one SOL transfer (300 CU) plus one SPL token transfer (4,500 CU) needs about 4,800 CU. At a medium priority tier of 10,000 micro-lamports/CU:

priority_fee = 4,800 × 10,000 / 1,000,000 = 48,000 lamports
base_fee     = 5,000 lamports (one signature)
total        = 53,000 lamports ≈ 0.000053 SOL

At $150/SOL that is about $0.008 — less than a cent. A complex DEX swap at 70,000 CU with high-tier priority pricing (50,000 micro-lamports/CU) would cost 70,000 × 50,000 / 1,000,000 = 3,500,000 lamports ≈ $0.53 at the same price.

Query getRecentPrioritizationFees on your RPC at send time for live priority fee data, and set your ComputeBudget limit slightly above your estimate to avoid mid-transaction failures.