I had a think about this last night and I believe that you can act as though you have distributed the profit to any of the beneficiaries in order to work out the tax due e.g. may pretend that you have distributed it to a limited company where the tax rate is 30%. Therefore the remaining 70% you can re-invest.