There are a lot of tough aspects to being President. But there are some perks too. Meeting extraordinary people across the country. Holding an office where you get to make a difference in the life of our nation. Air Force One. But perhaps the greatest unexpected gift of this job has been living above the store. for the past seven and a half years, that commute has been reduced to 45 seconds—the time it takes to walk from my living room to the Oval Office. As a result, I’ve been able to spend a lot more time watching my daughters grow up into smart, funny, kind, wonderful young women. The progress we’ve made in the past 100 years, 50 years, and, yes, even the past eight years has made life significantly better for my daughters than it was for my grandmothers. And I say that not just as President but also as a feminist. Now, the most important people in my life have always been women. I was raised by a single mom, who spent much of her career working to empower women in developing countries.

****

****

I watched as my grandmother, who helped raise me, worked her way up at a bank only to hit a glass ceiling. I’ve seen how Michelle has balanced the demands of a busy career and raising a family. Like many working mothers, she worried about the expectations and judgments of how she should handle the trade-offs, knowing that few people would question my choices. So we need to break through these limitations. We need to keep changing the attitude that raises our girls to be demure and our boys to be assertive, that criticizes our daughters for speaking out and our sons for shedding a tear. We need to keep changing the attitude that punishes women for their sexuality and rewards men for theirs. We need to keep changing the attitude that permits the routine harassment of women, whether they’re walking down the street or daring to go online. We need to keep changing the attitude that teaches men to feel threatened by the presence and success of women. As a parent, helping your kids to rise above these constraints is a constant learning process. Michelle and I have raised our daughters to speak up when they see a double standard or feel unfairly judged based on their gender or race—or when they notice that happening to someone else. It’s important for them to see role models out in the world who climb to the highest levels of whatever field they choose. And yes, it’s important that their dad is a feminist, because now that’s what they expect of all men.

“Are you up?” The emails arrive late, often after 1 a.m., tapped out on a secure BlackBerry from an email address known only to a few. The weary recipients know that once again, the boss has not yet gone to bed. The late-night interruptions from President Obama might be sharply worded questions about memos he has read. Sometimes they are taunts because the recipient’s sports team just lost. Last month it was a 12:30 a.m. email to Benjamin J. Rhodes, the deputy national security adviser, and Denis R. McDonough, the White House chief of staff, telling them he had finished reworking a speechwriter’s draft of presidential remarks for later that morning. Mr. Obama had spent three hours scrawling in longhand on a yellow legal pad an angry condemnation of Donald J. Trump’s response to the attack in Orlando, Fla., and told his aides they could pick up his rewrite at the White House usher’s office when they came in for work. Mr. Obama calls himself a “night guy,” and as president, he has come to consider the long, solitary hours after dark as essential as his time in the Oval Office.

****

****

He works on speeches. He reads the stack of briefing papers delivered at 8 p.m. by the National Security Council staff secretary. He reads 10 letters from Americans chosen each day by his staff. “He is thoroughly predictable in having gone through every piece of paper that he gets,” said Tom Donilon, Mr. Obama’s national security adviser from 2010 to 2013. “You’ll come in in the morning, it will be there: questions, notes, decisions.” One night last June, Cody Keenan, the president’s chief speechwriter, had just returned home from work at 9 p.m. and ordered pizza when he heard from the president: “Can you come back tonight?” Mr. Keenan met the president in the usher’s office on the first floor of the residence, where the two worked until nearly 11 p.m. on the president’s eulogy for nine African-Americans fatally shot during Bible study at the Emanuel African Methodist Episcopal Church in Charleston, S.C. Three months earlier, Mr. Keenan had had to return to the White House when the president summoned him — at midnight — to go over changes to a speech Mr. Obama was to deliver in Selma, Ala., on the 50th anniversary of “Bloody Sunday,” when protesters were brutally beaten by the police on the Edmund Pettus Bridge. “There’s something about the night,” Mr. Keenan said, reflecting on his boss’s use of the time. “It’s smaller. It lets you think.”