What is the formula to calculate cid from sha256 hash

Raw node is limited to 2MiB. that why I linked Supporting Large IPLD Blocks which allows both to reuse your old hashes and support any size of blocks.