<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:mgee="http://www.mge.com/20260505"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="mgee-20260505.xsd" xlink:type="simple"/>
    <context id="C_3a7506dd-919b-431e-931a-eb9356c2cfff">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001161728</identifier>
        </entity>
        <period>
            <startDate>2026-05-05</startDate>
            <endDate>2026-05-05</endDate>
        </period>
    </context>
    <context id="C_6ca49d2c-c1ad-4269-86de-2472a41b7b2b">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001161728</identifier>
            <segment>
                <xbrldi:explicitMember dimension="dei:LegalEntityAxis">mgee:MgeMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-05-05</startDate>
            <endDate>2026-05-05</endDate>
        </period>
    </context>
    <dei:AmendmentFlag
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_fb25fe41-79e2-4e0b-8ad4-a432cc72dcff">false</dei:AmendmentFlag>
    <dei:AmendmentFlag
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_e325f967-e80e-47c9-a7e5-12869e29067d">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_b8f7aff7-85b4-4aef-9976-a97319b2a75e">0001161728</dei:EntityCentralIndexKey>
    <dei:EntityCentralIndexKey
      contextRef="C_6ca49d2c-c1ad-4269-86de-2472a41b7b2b"
      id="F_68dba286-9227-439e-a9b5-068734574b71">0000061339</dei:EntityCentralIndexKey>
    <dei:DocumentType
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_ae1b1d13-5e30-49bd-980e-57ac220a32e6">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_9473bb53-3bd8-4594-9243-dce556fcbc36">2026-05-05</dei:DocumentPeriodEndDate>
    <dei:EntityFileNumber
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_d1f0005e-bdf3-4834-9743-5f43ad0e0938">000-49965</dei:EntityFileNumber>
    <dei:EntityRegistrantName
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_e4355169-c2a0-4035-8013-c95c76ff3c13">MGE Energy, Inc.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_0801ac8d-e0a7-4bd4-af1f-f80bd8f685c2">WI</dei:EntityIncorporationStateCountryCode>
    <dei:EntityAddressAddressLine1
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_5e9d6025-b7a2-427a-b492-e7817f9ea880">133 South Blair Street</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_a5074220-f30c-48b2-8a48-5b3641fca129">Madison</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_3ffe889f-13cf-49d9-b192-913f0bdf5c57">WI</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_83694882-76ee-4093-a9ed-a5160d9e5898">53788</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_94b8773f-f355-4fef-852f-1af42079d544">608</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_c9e74017-f171-40b6-a7da-4c62c5a83270">252-7000</dei:LocalPhoneNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_90a656f7-4e35-4467-afac-89f477fe990f">39-2040501</dei:EntityTaxIdentificationNumber>
    <dei:EntityFileNumber
      contextRef="C_6ca49d2c-c1ad-4269-86de-2472a41b7b2b"
      id="F_37f6e6a8-3372-4580-a1a5-4ff55bd24aec">000-1125</dei:EntityFileNumber>
    <dei:EntityRegistrantName
      contextRef="C_6ca49d2c-c1ad-4269-86de-2472a41b7b2b"
      id="F_27875446-439b-4f9a-b3b5-6cb302bace70">Madison Gas and Electric Company</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="C_6ca49d2c-c1ad-4269-86de-2472a41b7b2b"
      id="F_a253d639-0ec9-413a-b82b-2a6125c71ea0">WI</dei:EntityIncorporationStateCountryCode>
    <dei:EntityAddressAddressLine1
      contextRef="C_6ca49d2c-c1ad-4269-86de-2472a41b7b2b"
      id="F_4b21f131-599c-4b5c-a0da-8a37ea89da37">133 South Blair Street</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="C_6ca49d2c-c1ad-4269-86de-2472a41b7b2b"
      id="F_a7f97bf6-7c86-4423-879a-c2553585893d">Madison</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="C_6ca49d2c-c1ad-4269-86de-2472a41b7b2b"
      id="F_b5fa4ca3-51ec-4f75-895e-c5064b01dc86">WI</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="C_6ca49d2c-c1ad-4269-86de-2472a41b7b2b"
      id="F_7fb315b7-a4ef-46a3-8b7f-27161f915f22">53788</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="C_6ca49d2c-c1ad-4269-86de-2472a41b7b2b"
      id="F_6baa52d8-430e-4119-a694-56b9b30c3d42">608</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="C_6ca49d2c-c1ad-4269-86de-2472a41b7b2b"
      id="F_0b07a5b4-99ef-4be0-b5dc-3b8b02a4c4d8">252-7000</dei:LocalPhoneNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="C_6ca49d2c-c1ad-4269-86de-2472a41b7b2b"
      id="F_93cc6438-4cc1-4158-bd76-22da66a90106">39-0444025</dei:EntityTaxIdentificationNumber>
    <dei:WrittenCommunications
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_85814060-205d-48ce-b683-61ee7d632d53">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_72bfa6fc-ca71-4e3a-b4d4-9ad28d3ac87f">false</dei:SolicitingMaterial>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_857325b7-dc83-483e-8c69-6fb87cd11f51">false</dei:PreCommencementIssuerTenderOffer>
    <dei:PreCommencementTenderOffer
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_ba9a97ae-ca9e-47f1-b0d8-fd7291e62e2b">false</dei:PreCommencementTenderOffer>
    <dei:Security12bTitle
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_c3d31f91-b2b7-4c47-a769-42a6c76e8ae1">Common Stock, $1 Par Value Per Share</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_7fdf4206-d9fa-4a74-8390-58f86fbd6a57">MGEE</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_0925b362-7dc3-4b06-b5f2-052052769d71">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="C_3a7506dd-919b-431e-931a-eb9356c2cfff"
      id="F_a5b92ba8-42bb-4133-9462-80add99cff03">false</dei:EntityEmergingGrowthCompany>
    <dei:EntityEmergingGrowthCompany
      contextRef="C_6ca49d2c-c1ad-4269-86de-2472a41b7b2b"
      id="F_8d67b932-5cc1-483b-ae68-7ea36139f63b">false</dei:EntityEmergingGrowthCompany>
</xbrl>
