The mayor of the City of New York is head of the executive branch of New York City's government. The mayor's office administers all city services, public property, police and fire protection, most public agencies, and enforces all city and state laws within New York City.

The budget overseen by the mayor’s office is the largest municipal budget in the United States at $70 billion a year.[1] The city employs 325,000 people, spends about $21 billion to educate more than 1.1 million students (the largest public school system in the United States), levies $27 billion in taxes, and receives $14 billion from the state and federal governments.

The mayor’s office is located in New York City Hall; it has jurisdiction over all five boroughs of New York City: Manhattan, Brooklyn, the Bronx, Queens, and Staten Island. The mayor appoints a large number of officials, including commissioners who head city departments, and his deputy mayors. The mayor's regulations are compiled in title 43 of the New York City Rules. According to current law, the mayor is limited to two consecutive four-year terms in office. It was changed from two to three terms on October 23, 2008, when the New York City Council voted 29–22 in favor of passing the term limit extension into law.[2] However, in 2010, there was a referendum, reverting the limit to two terms, which passed overwhelmingly.[3]

In 1665 Governor Richard Nicolls appointed Thomas Willett as the first mayor of New York. For 156 years, the mayor was appointed and had limited power. Between 1783 and 1821 the mayor was appointed by the Council of Appointments in which the state’s governor had the loudest voice. In 1821 the Common Council, which included elected members, gained the authority to choose the mayor. An amendment to the New York State Constitution in 1834 provided for the direct popular election of the mayor. Cornelius W. Lawrence, a Democrat, was elected that year.

Gracie Mansion has been the official residence of the mayor since Fiorello La Guardia’s administration in 1942. Its main floor is open to the public and serves as a small museum.

The mayor is entitled to a salary of $225,000,[4] but early 21st century mayor Michael Bloomberg, the 16th-richest[5] man in the world, declined the salary and instead was paid $1 yearly. Bloomberg had an estimated net worth of $33 billion as of 2014.

Tammany Hall, which evolved from an organization of craftsmen into a Democratic political machine, gained control of Democratic Party nominations in the state and city in 1861. It played a major role in New York City politics into the 1960s and was a dominant player from the mayoral victory of Fernando Wood in 1854 through the era of Robert Wagner (1954–65).

The mayor of New York City may appoint several deputy mayors to assist him and to oversee major offices within the executive branch of the city government. The powers and duties, and even the number of deputy mayors, are not defined by the City Charter. The post was created by Fiorello La Guardia (who appointed Grover Whalen as deputy mayor) to handle ceremonial events that the mayor was too busy to attend. Since then, deputy mayors have been appointed with their areas of responsibility defined by the appointing mayor. There are currently seven deputy mayors, all of whom report directly to the mayor. Deputy mayors do not have any right to succeed to the mayoralty in the case of vacancy or incapacity of the mayor (the order of succession is the city’s public advocate, then the comptroller).

Oversees and coordinates the operations of the Human Resources Administration, Department of Homeless Services, Department for the Aging, the Administration for Children’s Services, Department of Youth and Community Development, and related agencies.

The New York City mayoralty has played a central role in several films and television series. Spin City (1996–2002), set in City Hall, it cast Barry Bostwick as the dim-witted mayor, but starred Michael J. Fox as a deputy mayor whose primary task was to keep the mayor from embarrassing himself in front of the media and voters. City Hall (1996) starred Al Pacino as an idealistic mayor and John Cusack as his deputy mayor, who leads an investigation with unexpectedly far-reaching consequences into the accidental shooting of a boy in New York. The Taking of Pelham One Two Three (1974) features Lee Wallace as an indecisive, flu-struck mayor who is bullied by his deputy and booed by the citizenry. The comic book series Ex Machina posits an alternate history in which the 2001 election is won by the independent Mitchell Hundred, a former superhero called the Great Machine, who sweeps to victory after saving the second tower of the World Trade Center on September 11. A fictional mayor is also featured in the 2003 Teenage Mutant Ninja Turtles animated series.