Sell stocks at loss but have sold no other stocks

If I sell shares of stocks at a loss, but that is the only sale of stocks withing a given year is there still a tax benefit for the year?  Or must there be gains to out the loss against in order to benefit?