Solana Priority Fee Calculator
Understanding exactly how much your Solana priority fee will cost before sending a transaction helps you balance speed and cost. This page explains the calculation formula and provides a reference table for common scenarios.
Priority Fee Formula
The Solana protocol calculates your prioritization fee using this formula:
Prioritization Fee = ceil(compute_unit_price × compute_unit_limit / 1,000,000) lamports
Where compute_unit_price is in micro-lamports and compute_unit_limit is the requested CU budget. The result is denominated in lamports (1 SOL = 1,000,000,000 lamports).
Priority Fee Reference Table
| Priority Level | CU Price (μlamports) | 200K CU Fee (lamports) | Total Fee (approx.) |
|---|---|---|---|
| Minimum | 1 | 0.2 | ~5,000 lamports |
| Low | 1,000 | 200 | ~5,200 lamports |
| Medium | 10,000 | 2,000 | ~7,000 lamports |
| High | 100,000 | 20,000 | ~25,000 lamports |
| Very High | 1,000,000 | 200,000 | ~205,000 lamports |
| Max (NFT Drop) | 5,000,000 | 1,000,000 | ~1,005,000 lamports |
Dynamic Fee Estimation with getRecentPrioritizationFees
Rather than hardcoding a fee, use the getRecentPrioritizationFees RPC method to fetch real-time fee data from the last 150 blocks. This allows your application to set an optimal fee based on current network conditions:
const connection = new Connection('https://api.mainnet-beta.solana.com');
const recentFees = await connection.getRecentPrioritizationFees();
// Get the 75th percentile for a balanced fee
const sorted = recentFees.map(f => f.prioritizationFee).sort((a, b) => a - b);
const p75Index = Math.floor(sorted.length * 0.75);
const recommendedFee = sorted[p75Index];
console.log(`Recommended priority fee: ${recommendedFee} microlamports/CU`);
Full Cost Breakdown Example
For a typical token transfer transaction with 1 signature, 200,000 CUs requested, and a medium priority fee of 10,000 microlamports/CU:
- Base fee: 5,000 lamports (fixed per signature)
- Priority fee: ceil(10,000 × 200,000 / 1,000,000) = 2,000 lamports
- Total transaction fee: 7,000 lamports = 0.000007 SOL
- At $150/SOL: approximately $0.00105 USD total
The Common category includes then following block: Paragraph, image, heading, latest gallery, quote, audio, cover, video. The paragraphs block is the default block type. This is should not to have any alignment of any kind.