<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2022"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:us-gaap="http://fasb.org/us-gaap/2022"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="mtb-20230512.xsd" xlink:type="simple"/>
    <context id="duration_2023-05-12_to_2023-05-12">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000036270</identifier>
        </entity>
        <period>
            <startDate>2023-05-12</startDate>
            <endDate>2023-05-12</endDate>
        </period>
    </context>
    <context id="duration_2023-05-12_to_2023-05-12_us-gaap-StatementClassOfStockAxis_us-gaap-CommonStockMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000036270</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">us-gaap:CommonStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-05-12</startDate>
            <endDate>2023-05-12</endDate>
        </period>
    </context>
    <context id="duration_2023-05-12_to_2023-05-12_us-gaap-StatementClassOfStockAxis_us-gaap-SeriesHPreferredStockMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000036270</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">us-gaap:SeriesHPreferredStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-05-12</startDate>
            <endDate>2023-05-12</endDate>
        </period>
    </context>
    <dei:EntityRegistrantName
      contextRef="duration_2023-05-12_to_2023-05-12"
      id="Hidden_dei_EntityRegistrantName">M&amp;T BANK CORP</dei:EntityRegistrantName>
    <dei:AmendmentFlag contextRef="duration_2023-05-12_to_2023-05-12">true</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="duration_2023-05-12_to_2023-05-12"
      id="Hidden_dei_EntityCentralIndexKey">0000036270</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="duration_2023-05-12_to_2023-05-12">8-K/A</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="duration_2023-05-12_to_2023-05-12">2023-05-12</dei:DocumentPeriodEndDate>
    <dei:EntityIncorporationStateCountryCode contextRef="duration_2023-05-12_to_2023-05-12">NY</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="duration_2023-05-12_to_2023-05-12">1-9861</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="duration_2023-05-12_to_2023-05-12">16-0968385</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="duration_2023-05-12_to_2023-05-12">One M&amp;T Plaza</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown contextRef="duration_2023-05-12_to_2023-05-12">Buffalo</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="duration_2023-05-12_to_2023-05-12">NY</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="duration_2023-05-12_to_2023-05-12">14203</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="duration_2023-05-12_to_2023-05-12">(716)</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="duration_2023-05-12_to_2023-05-12">635-4000</dei:LocalPhoneNumber>
    <dei:WrittenCommunications contextRef="duration_2023-05-12_to_2023-05-12">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="duration_2023-05-12_to_2023-05-12">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="duration_2023-05-12_to_2023-05-12">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="duration_2023-05-12_to_2023-05-12">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle contextRef="duration_2023-05-12_to_2023-05-12_us-gaap-StatementClassOfStockAxis_us-gaap-CommonStockMember">Common Stock, $.50 par value</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="duration_2023-05-12_to_2023-05-12_us-gaap-StatementClassOfStockAxis_us-gaap-CommonStockMember">MTB</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="duration_2023-05-12_to_2023-05-12_us-gaap-StatementClassOfStockAxis_us-gaap-CommonStockMember">NYSE</dei:SecurityExchangeName>
    <dei:Security12bTitle contextRef="duration_2023-05-12_to_2023-05-12_us-gaap-StatementClassOfStockAxis_us-gaap-SeriesHPreferredStockMember">Perpetual Fixed-to-Floating Rate Non-Cumulative Preferred Stock, Series H</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="duration_2023-05-12_to_2023-05-12_us-gaap-StatementClassOfStockAxis_us-gaap-SeriesHPreferredStockMember">MTBPrH</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="duration_2023-05-12_to_2023-05-12_us-gaap-StatementClassOfStockAxis_us-gaap-SeriesHPreferredStockMember">NYSE</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany contextRef="duration_2023-05-12_to_2023-05-12">false</dei:EntityEmergingGrowthCompany>
    <dei:AmendmentDescription contextRef="duration_2023-05-12_to_2023-05-12">This Amendment No.&#160;1 to M&amp;T Bank Corporation&#x2019;s Current Report on Form 8-K filed on May&#160;17, 2023 (the &#x201c;Original Form 8-K&#x201d;) supplements the Original Form 8-K to provide information required to be disclosed pursuant to Item 5.02(c)(3) that had not been determined at the time of the filing of the Original Form 8-K, as provided by Instruction 2 to Item 5.02. No other changes have been made to the Original Form 8-K.</dei:AmendmentDescription>
</xbrl>
