All Spanish nouns (sustantivos), including people, places, animals, things, ideas, and feelings, have a gender (male or female).
The fact that inanimate objects have a gender in Spanish does not mean that things like tables and books are physically feminine or masculine. They have genders in a grammatical sense and must be used with articles and adjectives that match their gender.
There are a few general rules you can follow to determine if a noun is feminine or masculine.
Most masculine nouns end in o. An o ending can indicate that a person or animal is male or that an object, idea, etc. is grammatically masculine.
el cartero
the mailman/postman
el niño
the child/son
el tío
the uncle
el teatro
the theater
el dormitorio
the bedroom
Words that end in the following letters or letter combinations are often masculine:
an accented vowel (á, é, í, ó, ú)
-ma
a consonant other than -d, -z
-e
The table below show examples of masculine words with the endings listed above.
The following nouns are exceptions to the above rules and are feminine, not masculine.
Words Ending in -o
La foto, la mano, la moto, la libido, la radio, la virago, la polio.
Words Ending in -e
La llave, la calle, la fiebre, la carne, la frase, la gente, la nieve, la noche, la nube, la sangre, la suerte, la tarde, la muerte, la madre, la base, la clase, la clave, la corriente, la fuente, la llave, la sede, la serpiente, la torre.
Words Ending in Consonants Besides -d or -z
La miel, la sal, la hiel, la piel, la coliflor, la sor, la labor, la flor.
Most feminine nouns end in -a. Ending in an -a indicates that a person or animal is female or that an object, idea, etc. is grammatically feminine.
la enfermera
the nurse
la profesora
the teacher
la hija
the daughter
la rosa
the rose
la guitarra
the guitar
la piscina
the pool
Nouns that end in in -d, -z, or -ión are also feminine.
-d
la felicidad (happiness), la virtud (virtue), la salud (health).
-z
la paz (peace), la nariz (nose), la luz (light).
-ión
la canción (song), la religión (religion), la irritación (irritation)
The following nouns are exceptions to the above rules and are masculine, not feminine.
Words Ending in -a
el drama, el enigma, el esquema, el estigma, el idioma, el mapa, el problema, el morfema, el sistema, el aroma, el tema, el axioma, el carisma, el clima, el dilema, el diagrama, el fantasma, el prisma, el estratega, el planeta, el día, el buda, el panda.
Words Ending in -d
el huésped, el ataúd, el abad, el alud, el áspid, el laúd, el milord, el récord, el césped.
Words Ending in -z
el aprendiz, el cáliz, el arroz, el lápiz, el pez, el ajedrez, el antifaz, el maíz, el albornoz, el altavoz, el avestruz, el altramuz, el cariz, el barniz, el disfraz, el haz, el matiz.
Words Ending in -ión
el ansión, el roción, el notición, el sentención.