Hillary Clinton on Wednesday said it's harder for successful women to be perceived as likable, and cited that as a factor in her election loss last year to Donald Trump.

Clinton said on NBC that she talked to Sheryl Sandberg, the top Facebook executive who has written about how gender affects people's success in life, who said it would be difficult for Clinton to succeed.

"She says, 'Look, the research is absolutely clear. The more professionally successful a man becomes, the more likable he is. The more professionally successful a woman becomes, the less likable she is,'" Clinton said.

Clinton said that while she was at the State Department, she was working for President Obama, which made it more easy for people to accept her. But she said that changed when she tried to win the White House on her own.

"When a woman walks into the arena and says, 'I'm going for this myself,' it really does have a dramatic effect on how people perceive," she said.

Clinton is doing press for her new book, What Happened, and said she wrote it to explore the factors that led to her loss.

"In addition to the mistakes that I made, which I recount in the book, what about endemic sexism and misogyny, not just about politics but in our society," she said.