For example, if someone (single filer) makes 45k in regular income and wants to sell stock which would realize 5k of long-term capital gains:
Do they pay 15% on the capital gains because, with 50k total income, they are in the 15% capital gains bracket?
Or, do they pay 0% on the capital gains because, with 50k total income minus the 12k standard deduction (38k), they are in the 0% capital gains bracket?
This question is similarly about deductions and capital gains, but doesn't answer about when the bracket changes.