Your brokerage will send you a form with all the info at the end of the year.
Holding less than a year is considered short-term capital gains and will be taxed greater than your long-term capital gains. Short term will be 10% to 40% depending on your bracket. Long term is taxed 0%, 15%, or 20% for most normal folk.
Short and long capital gains is considered ordinary income.