How I Met Your Mother was a show about all the things that happen before you meet your soulmate. At its heart, it is buddy sit-com about five friends living in New York and dealing with their love lives. The show is full of inside jokes, wacky shenanigans, and endearing moments of romantic passion.

The characters of How I Met Your Mother are also unique from each other. There is the battered romantic Ted Mosby, the cynical Robin Sherbotsky, the pure hearted Marshal Erikson, the advice giving Lily Aldrin, and the mischievous Barney Stinson. They all get along fairly well together despite their differences in personality.

With these differences, it would be interesting to see which houses they would be sorted in if they were to enter Hogwarts School of Witchcraft and Wizardry. So get that sorting hat out so we can see where these twenty-something house.

James: Slytherin

James is Barney’s half-brother and a recurring character throughout the show. Barney looks up to James in a lot of ways, and it James who helped Barney become the womanizer he is within the show. James fits as a Slytherin due to his general competence in life. Likely Barney, he effortlessly nails style and financial concerns to the point where it is not a concern for him. However, the biggest indication of James being a Slytherin is his willingness to put his own interests above others, even when it hurts people he cares about. This can be seen in James when he is found out to be serially cheating on his husband, resulting in the two splitting up with each other for a time.

Patrice: Hufflepuff

Patrice is a co-worker and frenemy of Robin at World Wide News. She is basically a Hufflepuff in every way as she supportive, kind, loyal, super positive, and loves to help people in need. This can be seen in her consistent support and willingness to help Robin. While Robin may be unable to stand her most of the time, Patrice always has her back even if it is not vice-versa. Patrice truly is the ideal and wholesome Hufflepuff we would all like in our lives.

Victoria: Ravenclaw

Victoria is Ted’s ex-girlfriend, and one of Ted’s strongest relationships. Like Ted, she is a romantic who tends to believe in things like “the one.” While these ideals could put her in Gryffindor, it is her dedication to her love of baking that puts her as a Ravenclaw. As a Ravenclaw, she tends to have a creative side, which she expresses through her baked goods. This love of baking is iconic for her and she has been shown to willingly to sacrifice a chance at love for her passion as a baker. Additionally, Victoria has strong sense of intuition as she is the one who points out to Ted that he will never settle on anyone because he is stuck in a love triangle with Barney and Robin.

Ranjit: Hufflepuff

The former cab driver turned limo driver is such a great supporting character throughout the show. There really is not much known about him, but he has always been willing to help out the gang whenever it involved getting someone somewhere. He was always passionate in helping the gang even though he did not know them all that well and was there to give them the occasional nugget of wholesome wisdom. It was just in his nature to be friendly and helpful, which is why he is a Hufflepuff. Additionally, he was fervently upset with Barney after he betrayed Ted by sleeping with Robin. This sense of anger after witnessing disloyalty is another strong sign for him as a Hufflepuff.

Tracy: Ravenclaw

Tracy is The Mother in How I Met Your Mother. Though, her personality and identity are only shown in the final season, it is clear she is a Ravenclaw. Tracy’s creativity is shown through everything she does such as singing with her food or naming her cookies “sumbitches.” Her interests have always been artistic at heart as she has been both a bassist for a long time and eventually went on to write her own book. Aside from this, she has a degree in economics so that she could help end poverty. She also has that similar air of sophistication and nerdy similar to Ted.

Marshall: Gryffindor

Marshall is a lawyer and college friend of Ted. While he would fit as a Hufflepuff, he fits better as a Gryffindor. More than anyone else on the show, Marshall has always been interested in doing the right thing. Whether doing the right thing is calling out your friends for their bad behavior or being determined to save the environment in whatever way he can, Marshal has always been the character to stand his ground and do what he feels is right. While Marshall has occasionally sacrificed his values, it has always been because their was another value that he cared for more. Additionally, Gryffindors are known for being fighters more than any of the other houses, and while Marshall does not necessarily enjoy fighting, he is sure is good at it.

Lily: Slytherin

Lily is an artist, kindergarten teacher, and love interest of Marshall. Though, Lily’s attentive caring for her friends may make her seem like a Hufflepuff, she is definately not. She may seem sweet and bubbly, but there is a dark side to Lily that makes her the most intimidating character on the show. Lily has always had a subtle grip over the lives of her friends.Whether that be reeling in Barney when his antics go to far, meddling with her friend’s love lives, or ripping off the head of her student’s stuffed horse to traumatize him, Lily uses cleverness and subterfuge to sway people to see things her way. Thankfully she tends to use these skills benevolently, yet it is still terrifying.

Barney: Slytherin

Barney is womanizer of the group. There really is no other house that Barney fits more than Slytherin. Barney’s sole goal in life is to hookup with women, and to do so in the most ludicrous and intricate of ways. Aside from that, he always likes to stir up mischief by meddling in the lives of his friends in intricate ways such as exposing Robin’s past as a popstar or trying to get Ted laid. Barney desires little, but when he does see something he wants, his ambition knows no end.  While he mellows out by the end of the series, his ability to trick and bamboozle people is beyond any other character making him the perfect Slytherin.

Robin: Slytherin

Robin is the on and off again love interest of both Ted and Barney. Slytherin fits Robin the best, because of her ambition. Above everything else, Robin cares about her career as a journalist. She has basically always put her job before everything else whether that be when she and Ted broke up or when she divorced Barney. Her ambition has gotten her far, as by the end of the series she is a famous journalist who got to travel all around the world. Additionally, she has never been against doing immoral things to get what she wants, which is another Slytherin trait.

Ted: Ravenclaw

The main character of the show, Ted narrates the series and the lives of the five main characters. Ted’s core traits are his love of romance and his sense of intellectualism. While his romanticism could possibly put him in either Hufflepuff or Gryffindor, his romance is more of an intrigue of his than a feeling or value. He is a nerd at heart and loves to go off on rants about obscure and niche things nobody cares about except a select few. He also loves to be sophisticated and is a talented architect. These all make him an intelligent individual with niche interests, which Ravenclaw suits best.

Next: How I Met Your Mother: 5 Characters Who Deserve Spin Offs (& 5 Who Don’t)