The IRS ruled that bitcoins and other cryptocurrencies are property, not currency. As such, you determine gain or loss in the same was as any other type of property. Compare what you paid for the bitcoins and what you received on the sale (making adjustments for commissions, etc.).
Casualty losses such as from a storm, in areas declared by the President to warrant federal assistance. An election may be made to deduct the loss in the year before the loss or the year of the loss.