"How do you calculate your cost basis and if you are at a loss"
Whether you are in profit or loss has NO bearing
Cost base is the price you paid for the options PLUS the exercise price
So if you paid 10c for your options and they are now worth 5c plus say, 4c exercise price, then your cost base is 14c, (example is for illustration purposes only)
Buying and selling being treated as a wash sale is dependent on your INTENTION