Please follow
https://www.irs.gov/uac/capital-gains-and-losses-10-helpful-facts-to-know-2
.