The float is the amount of actual issued shares. The actual shares outstanding can be greater and can include unissued shares. Those unissued shares do not go into the computation of the market cap. All the shares in the float go into the computation of the market cap.
Which is to say that market cap is based on shares outstanding, including those held by institutions or insiders who can't trade freely. They still own part of the company.
Float is the portion of shares outstanding that do trade freely.
Treasury stock is shares authorized and issued but held by the company itself. It's true that those shares don't count towards market cap. This may be what you were thinking of.
Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.