Firstly, nearly all nouns ending in "a" are feminine, so if you are not sure it's a safe bet that it's feminine. There a few exceptions (mapa, systema, programa, etc.), which you will just have to learn. All words ending in dad, (publicidad, ciudad, universidad), encia, (diferencia, conferencia) ion (reservacion, nacion) z (madurez) are feminine. Almost everything else, is masculine, usually ending in o.