I don't see a tag for United States, so I'm having to assume this is US taxes. It doesn't matter what app you use, IRS trades are all calculated the same.
First, you have to report each trade on a 8949 and from that the totals go into a schedule D. Short term trades are stocks that you've kept exactly one year or less, long term trades are for 1 year + 1 day or more. Trades where you sold a stock for a loss, then bought that stock back again under 30 days don't get to count as a loss. This only affects realized capital gains and losses, you don't count fees.
First, take all of your short term gains then offset them by all of your short term losses. Do the same for long term gains and losses. Short and long term gains are taxed at different rates. You can deduct losses from short term to your long term and vice versa. Then you can deduct the total losses up to $3000 (household, $1500 married, filing separately) per year on your regular income taxes or other dividend taxes. If you have over $3000 in losses, then you need to carry that over to subsequent years.
Edited per Dave's comments: thanks Dave