Nora's choice to be selfish, for once, can be seen as a triumph, as suggested above, while also being a profound admission of defeat. Leaving her children behind, Nora is choosing to abandon everything that she has built and worked for as well as all the emotional ties she has in the world.
Her children will suffer her absence.
This is not a happy ending but a bitter beginning to a new life for a person who has no identity. The tragedy is that she has fooled herself into believing that she could continue on if only she could pay the loan off. Her hopes were tragic because they led her to the most depressing and dark defeat she could have faced - the loss of her entire life.
This loss is matched, perhaps, by an opportunity to begin again, but it's hard for me to see the end of this play as happy.
I think Henrik Ibsen's ending in A Doll's House is a triumphant ending. Nora has finally realized that she is not responsible for Torvald's happiness. In fact, how can she make Torvald happy when she herself is so unhappy? In the end, Nora has finally decided to make herself happy. There is nothing tragic about that. Nora has to leave Torvald to find herself. He smothers Nora and treats her as a child. To make him happy, she has played along with his game. Now, she realizes that she cannot play his game any longer. Nora has grown up. She must find her own identity. She is more than Torvald's wife. She is Nora. She is an individual with individual feelings. As long as she remains with Torvald, she will remain his little squirrel or little songbird. In the end, she realizes that she has been unhappy playing his childish games. If she wants a macaroon, by God she will have one. Leaving Torvald is the best decision she ever made. The ending is truly triumphant.
Torvald deserves to be alone. He did not appreciate the woman he had. Nora is better off without him.
I certainly think that the ending can be seen as tragic, to some extent. I don't necessarily believe that Nora's liberation is a tragic event, though. If there is any tragedy present, it comes in the fact that Ibsen's ending is a telling reminder of the collision between tradition and modernity. Torvald fails to recognize this. He cannot conceive of a setting where Nora is nothing more than a "doll." However, Nora understands clearly that her voice and narrative represent the forces of modernity in this struggle against Torvald's embrace of antiquated notions of the good. In this collision between equally desirable, yet ultimately incompatible courses of the good, Torvald is tragically pitted as embracing something that is obsolete and that Nora invalidates with her departure. If one were to construct some aspect of tragedy, this could represent a good starting point as Torvald is exposed as quite helpless and emotionally impotent in being able to fully grasp the level of change that has gripped his state of being in the world.