Market cap is calculated by multiplying the current share price (or token price) by the total number of outstanding shares (or circulating supply). The formula is the same for stocks and cryptocurrencies.
Market Cap = Current Price × Outstanding Shares (or Circulating Supply)
At a $230 share price with 15.2 billion shares outstanding, Apple's market cap is $230 × 15,200,000,000 = $3.50 trillion.
At $95,000 per BTC with 19.8 million coins in circulation, Bitcoin's market cap is $95,000 × 19,800,000 = $1.88 trillion.
Related: What Is Market Cap? · Fully Diluted Market Cap