The stability of a carbocation is determined by the number of alkyl groups attached to the positively charged carbon.