I'm arriving late, about midnight. Need to get to my hotel in the medina.
I found getting a taxi at the airport in Marrakech the least enjoyable and most stressful part of my entire time in Morocco! You'll be approached by a million people, and they will all start vying for your business and trying to force you into their taxi. It shouldn't cost more than 100 dirhams maximum, but they are going to start with prices much higher than than that. I had one guy quote me 500 dirhams!
Because you are staying in the medina and arriving late, it may be worth it to book a taxi directly through your riad. The medina is incredibly hard to navigate, and most taxi drivers are not familiar with all of the riads and streets. Many streets don't even allow cars. My first time there, I was dropped in the middle of the medina blocks from my riad, completely confused and unsure where to go.
Having your riad or hotel organize an airport pickup will cost a bit more, but I personally think it's well worth the extra money.
I never took a taxi in Marrakech and although the people are extremely friendly-they definitely want your money. I stayed at a riad (Riad Al Jana) and they sent a car to pick me up. As soon as I got to the airport, the man was holding a sign with my name. The pick up was included when I booked the room. I suggest you contact your hotel and set up a service. You may incur a fee, but it is probably well worth it since you are landing late, and especially if it is your first time in Morocco and you don't know what to expect.
Like Serena, even though I was picked up, the street my riad was on did not allow cars. The man dropped me off at the end of a small street (moreso an alley) where another man waited for me with a barrel cart for my luggage and we walked to the riad.
Update: I forgot to mention, bring earplugs!! :)
We stayed in the Medina as well and arranged the transfer from the airport with them. This is especially convenient because you may have to walk a bit in the Medina as the cab can only go so far. It's also a good way to ensure you don't get taken to a few stops along the way! Depending on where the riad is, your walk from where the cab drops you might be pretty hard to figure out as well!
Also, we did utilize some transfers while staying in Marrakech. We organized those all through the riad as well.
day time 150 - 200 Dh max.
night time 200 - 250 Dh max.
Arriving at night will make negotiating the actual taxi rate ( 60dh is what you should expect to pay) , but you have a few options :
1. Arrange a pick-up before hand ( honestly , that sounds incredibly boring and defeats the purpose of going to Morocco : Adventure!)
2. Get a cab directly from the airport exit. Honestly, this will probably cost around 300-600 dh. Unless you are great at haggling.
3. Walk 200 meters from the exit towards the roundabout ( see below for details) and catch a taxi there. You can use this as a haggling tactic , or just follow through and grab a taxi from the roundabout. You'll still need to haggle, but you will get a better story in the process and save a few Dh's!
More information on transportation: http://wikitravel.org/en/Marrakech