You can know the case tables perfectly and still get every sentence wrong, because in practice the case is usually chosen by a preposition rather than by the grammar of the sentence. Learning the cases without learning which preposition takes which is the most common way to stall.
There are three groups: always accusative, always dative, and the nine that go either way.
Always accusative
Five, and there is a mnemonic that has survived decades of teaching: DOGFU.
Ich gehe durch den Park. — I walk through the park.
Das ist für dich. — That is for you.
They never take anything else. No exceptions to remember. Outside the mnemonic, bis (until, as far as) takes the accusative too, but it usually stands with no article (bis Montag) or leans on a second preposition (bis zum Bahnhof).
Always dative
Nine, and worth learning as a chant because they come up constantly.
| Preposition | Means |
|---|---|
| aus | out of, from (origin) |
| bei | at, near, at somebody's place |
| mit | with |
| nach | after, to (cities and countries) |
| seit | since, for (time) |
| von | from, of |
| zu | to |
| gegenüber | opposite |
| außer | except |
Ich fahre mit dem Auto. — I go by car.
Ich komme aus der Stadt. — I come from the city.
The nine that go either way
These take accusative for movement into a place and dative for position in a place.
| Preposition | Means |
|---|---|
| in | in, into |
| auf | on, onto |
| an | at, on (vertical surfaces) |
| über | over, above |
| unter | under |
| vor | in front of |
| hinter | behind |
| neben | next to |
| zwischen | between |
The test is not "is there motion" — it is is there a destination: Wohin? takes the accusative, Wo? the dative.
| Accusative — going in | Dative — already there |
|---|---|
| Ich gehe in die Schule. | Ich bin in der Schule. |
| Ich lege das Buch auf den Tisch. | Das Buch liegt auf dem Tisch. |
| Ich hänge das Bild an die Wand. | Das Bild hängt an der Wand. |
The contractions you will hear constantly
Germans merge preposition and article whenever they can, and in speech the merged form is the normal one.
| Full | Contracted |
|---|---|
| in dem | im |
| in das | ins |
| an dem | am |
| an das | ans |
| zu dem | zum |
| zu der | zur |
| bei dem | beim |
| von dem | vom |
im and am are dative, ins and ans are accusative — so the contraction itself tells you which one was meant.
Genitive prepositions
A handful take the genitive. They belong to written and formal German; in speech many people use the dative with them instead — wegen dem Wetter, trotz dem Regen.
wegen (because of), trotz (despite), während (during), statt (instead of).
Wegen des Wetters bleiben wir zu Hause. — Because of the weather we are staying home.
Recognise these; you do not need to produce them early.
What to actually memorise
DOGFU, the nine dative ones as a chant, and the wohin/wo test for the two-way group. Then learn each new preposition with its case attached, the way you learn a noun with its article — mit dem, für den, and the case stops being a decision you make each time.
The cases themselves are set out in German cases.
Check your understanding
Choose your answer before opening the explanation.
Ich gehe in ___ Küche. Ich koche in ___ Küche. (die / der)
Show answer and explanation
Ich gehe in die Küche. Ich koche in der Küche.
With the two-way preposition in, a destination takes accusative and a location takes dative. Movement by itself is not enough: Ich laufe in der Küche describes running within the kitchen.