There is no direct formula to calculate number of isomers for an organic compound. Since isomers generally include both constitutional isomers (different atom/group connectivities) and stereoisomers (same atom connectivities but differ in spatial arrangements of atoms/groups).
If a molecular formula is given to you instead of a structure
It is a tedious process, but after you get a lot of practice you will definitely enjoy it. Good luck