<?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:mfic="http://www.apolloinvestmentcorp.com/20260618"
  xmlns:us-gaap="http://fasb.org/us-gaap/2025"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="mfic-20260618.xsd" xlink:type="simple"/>
    <context id="duration_2026-06-18_to_2026-06-18">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001278752</identifier>
        </entity>
        <period>
            <startDate>2026-06-18</startDate>
            <endDate>2026-06-18</endDate>
        </period>
    </context>
    <context id="duration_2026-06-18_to_2026-06-18_us-gaap-StatementClassOfStockAxis_us-gaap-CommonStockMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001278752</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">us-gaap:CommonStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-06-18</startDate>
            <endDate>2026-06-18</endDate>
        </period>
    </context>
    <context id="duration_2026-06-18_to_2026-06-18_us-gaap-StatementClassOfStockAxis_mfic-M8.00PercentNotesDue2028Member">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001278752</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">mfic:M8.00PercentNotesDue2028Member</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-06-18</startDate>
            <endDate>2026-06-18</endDate>
        </period>
    </context>
    <dei:AmendmentFlag
      contextRef="duration_2026-06-18_to_2026-06-18"
      id="Hidden_dei_AmendmentFlag">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="duration_2026-06-18_to_2026-06-18"
      id="Hidden_dei_EntityCentralIndexKey">0001278752</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="duration_2026-06-18_to_2026-06-18" id="Fact_1">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="duration_2026-06-18_to_2026-06-18" id="Fact_0">2026-06-18</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName contextRef="duration_2026-06-18_to_2026-06-18" id="ixv-330">MidCap Financial Investment Corporation</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode contextRef="duration_2026-06-18_to_2026-06-18" id="ixv-331">MD</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="duration_2026-06-18_to_2026-06-18" id="ixv-332">814-00646</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="duration_2026-06-18_to_2026-06-18" id="ixv-333">52-2439556</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="duration_2026-06-18_to_2026-06-18" id="ixv-334">9 West 57th Street</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown contextRef="duration_2026-06-18_to_2026-06-18" id="ixv-335">New York</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="duration_2026-06-18_to_2026-06-18" id="ixv-336">NY</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="duration_2026-06-18_to_2026-06-18" id="Fact_2">10019</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="duration_2026-06-18_to_2026-06-18" id="ixv-338">212</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="duration_2026-06-18_to_2026-06-18" id="Fact_9">515-3200</dei:LocalPhoneNumber>
    <dei:WrittenCommunications contextRef="duration_2026-06-18_to_2026-06-18" id="ixv-340">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="duration_2026-06-18_to_2026-06-18" id="ixv-341">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="duration_2026-06-18_to_2026-06-18" id="ixv-342">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="duration_2026-06-18_to_2026-06-18" id="ixv-343">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="duration_2026-06-18_to_2026-06-18_us-gaap-StatementClassOfStockAxis_us-gaap-CommonStockMember"
      id="Fact_3">Common Stock, $0.001 par value</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="duration_2026-06-18_to_2026-06-18_us-gaap-StatementClassOfStockAxis_us-gaap-CommonStockMember"
      id="Fact_4">MFIC</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="duration_2026-06-18_to_2026-06-18_us-gaap-StatementClassOfStockAxis_us-gaap-CommonStockMember"
      id="Fact_5">NASDAQ</dei:SecurityExchangeName>
    <dei:Security12bTitle
      contextRef="duration_2026-06-18_to_2026-06-18_us-gaap-StatementClassOfStockAxis_mfic-M8.00PercentNotesDue2028Member"
      id="Fact_6">8.00% Notes due 2028</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="duration_2026-06-18_to_2026-06-18_us-gaap-StatementClassOfStockAxis_mfic-M8.00PercentNotesDue2028Member"
      id="Fact_7">MFICL</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="duration_2026-06-18_to_2026-06-18_us-gaap-StatementClassOfStockAxis_mfic-M8.00PercentNotesDue2028Member"
      id="Fact_8">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany contextRef="duration_2026-06-18_to_2026-06-18" id="ixv-350">false</dei:EntityEmergingGrowthCompany>
</xbrl>
