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 type | Typical CU | Notes |
|---|---|---|
| SOL transfer | ~300 | System program transfer — very cheap |
| SPL token transfer | ~4,500 | Account checks and balance updates |
| Account creation (init) | ~3,000 | Allocating rent-exempt space |
| NFT mint | ~25,000–35,000 | Varies by standard (Metaplex, Token-2022) |
| DEX swap | ~50,000–80,000 | Highly variable by AMM implementation |
| Compressed NFT mint | ~10,000–15,000 | State 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.