dmertz
Level 15

Get your taxes done using TurboTax

Do a simulated tax return to find out.  Assuming that the $25,000 loss carried over from 2022 is some combination of short- and long-term capital losses, I think you'll find that all $23,000 of the 2023 capital gains will be offset, the remaining $2,000 of carryover will appear on Form 1040 line 7 (negative 2,000)  to offset $2,000 of ordinary income and, assuming that you have at least $2,000 of ordinary income to offset, nothing carrying forward to 2024.