short term capital gain can be deducted from short term capital loss or long term capital loss.
Short term capital gain cannot be deducted from passive loss from rental properties.