Every Swedish noun is an en-word or an ett-word. The noun decides — not the sound that follows.
SwedishLevel A1
Swedish has two words for a/an: en (about 75% of nouns, e.g. en bil, en apelsin, en vecka) and ett (about 25%, e.g. ett hus, ett äpple, ett år). Gender belongs to the noun and has to be learned with it; the first sound of the word does not matter.
Clues from the ending: -a, -ing, -het, -else and -are point to en (en tidning, en möjlighet, en lärare). -um, -ment and -eri point to ett (ett museum, ett dokument, ett bageri). Exceptions exist, such as ett öga. With no clue at all, en is the safer guess.
Gender shows up three times: en stor bil / bilen (the car), but ett stort hus / huset (the house). ett-words add -t to the adjective and take -et as the definite ending.
Examples
Jag köpte en bil igår.
I bought a car yesterday.
Hon har ett hus i Malmö.
She has a house in Malmö.
Jag har en fråga.
I have a question.
Vi har ett barn.
We have a child.
Det tar en timme.
It takes an hour.
Det är ett stort problem.
It's a big problem.
Common mistake
Wrong: Jag köpte en äpple. Right: Jag köpte ett äpple (I bought an apple). Wrong: Det är en stort problem. Right: Det är ett stort problem — problem is an ett-word, so the article and the adjective both change.