How closely does Princess Tutu follow Swan Lake and The Nutcracker?
The story is loosely based on this, but it actually revolves more around bending the inevitable fate thrown to Ahiru (Tutu) by third side of the story. The storyteller, if you prefer.

The ending of the anime is not same either, even though it uses the same kind of theme. IMHO the ending is most closely following the original story, if you look the big picture.