Yes, short term capital loss can be set off against either a short term capital gain or long term capital gain. Long term capital loss, however, can be set off only against long term capital gain.