There isn't any formula for structural isomers. But there are formulas for stereo isomers. If there are n chiral carbons in a molecule, then the following two cases may arise.
case 1: The ends of the molecule are asymmetric. In this case the number of structural isomers are 2n2n and all of them are optically active.
case2: The ends of the molecule is symmetric. Following two cases may arise
case 2a. n is even. In this case number of optically active form=2(n−1)2(n−1) Number of meso isomers is 2(0.5n−1)2(0.5n−1) and the total number of stereo isomer is the summation of these two.
case 2b. n is odd. In this case total number of stereo isomer is 2(n−1).2(n−1). Number of meso isomers is 2(0.5n−0.5)2(0.5n−0.5) and the number of optically active forms is the difference of these two
Hope that was useful.