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
For constitutional isomers the only way is you have to draw as many structures as possible without breaking valency / violating octet rule. After you draw the structure make sure it fits with the given molecular formula.
Calculate the unsaturation number and make sure the structure you draw should have the same unsaturation number as calculated.
Look out for hetero atoms in the molecule. For example if you have Oxygen atoms you have to list out all possible functional groups in the molecule. like alcohols, ethers, ketones, aldehydes, carboxylic acids, esters.