There is no simple answer for this! In short, the gender of nouns in French must be learnt, rehearsed and repeated until you can't hear the word any other way. Although there are some shortcuts for this, for example, you can almost guarantee words that end in aie, -oue, -eue, -ion, -te, – ´ ee, -ie, -ue and some others are going to be feminine and that words ending in -eau, -au, -aud, -aut, -o, -os, -ot are most likely masculine. However, due to the fact that there are exceptions to each of these rules, you cannot have 100 percent accuracy, even if you learned all the endings! Therefore, the best way to go about this is to find the gender of any word you find and write it and re-write until it is cemented in your head whether it's masculine or feminine!