I've hacked up some python code to work out your UK tax liability, assuming eithier that you are classified as a professional trader (income tax) or as an investor (capital gains tax). The code will read interactive brokers reports, but can also deal with information in flat .csv files. There is more detail on my blog.