If one has income under $41,675 for 2022, can u pay zero capital gains tax? If income is $46,000, can you reduce the taxable income to $41,000 by contributing to an IRA?

For long term stock sales capital gains.