How the rent-exempt minimum is calculated

One formula decides the deposit of every Solana account: (128 + data length) × lamports per byte. Worked examples and a calculator.

Updated

Every Solana account must hold a minimum balance, its rent deposit. The minimum depends on exactly two things: how many bytes the account stores, and the network’s current price per byte. Nothing else, not the token, not its value, not who owns it.

The formula

min_balance = (128 + data_len) × lamports_per_byte
  • data_len is the size of the account’s data in bytes: 165 for a token account, 82 for a mint, 0 for a plain wallet.
  • 128 bytes are added to every account for what the network stores about it anyway: its address, owner program, balance and flags.
  • lamports_per_byte is the price. It was 6,960 lamports until 2026, is 5,080 today and drops to 696 once all steps of SIMD-0437 are live.

One lamport is a billionth of a SOL (more on units), so a token account needed (128 + 165) × 6,960 = 2,039,280 lamports, the familiar 0.00203928 SOL.

Where 6,960 comes from

Solana originally priced storage per byte per year: 3,480 lamports. An account counted as rent-exempt once it held two years of rent, so the real minimum was 3,480 × 2 = 6,960 lamports per byte. SIMD-0194 dropped the two-year rule and folded both numbers into the single price lamports_per_byte = 6,960. Same deposits, simpler formula, and the starting point for SIMD-0437’s cuts.

Common account sizes

AccountBytesAt 6,960Today (5,080)At 696
Wallet (system account)00.0008910.0006500.000089
Nonce account800.0014480.0010570.000145
Mint820.0014620.0010670.000146
Token account1650.0020390.0014880.000204
Stake account2000.0022830.0016660.000228

In SOL. Token-2022 accounts and mints start at the same sizes and grow with every extension they carry.

Calculator

Original
0.002039
Today
0.001488
After step 5
0.000204

SOL. An account opened at the original price holds 0.000551 SOL more than it needs today.

Asking the network

You never have to hard-code the price. The RPC method getMinimumBalanceForRentExemption takes a data length and returns the current minimum in lamports, and the Solana CLI does the same with solana rent 165. Both follow every price change automatically, which is what wallets and apps rely on when they create accounts.

The minimum applies when an account is funded

An account’s deposit is set when it is created or resized. A later price change does not touch it. When the price falls, an old account simply holds more than today’s minimum, and the difference, its excess, stays there until its owner withdraws it. For token accounts and mints that is what WithdrawExcessLamports does; the scanner computes it for every account of a wallet.

Sources

Keep reading