<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2026 Workiva-->
<!--r:019e2206-f16f-7bc4-90fd-177c6bf79b48,g:57a797f8-9d97-4cf8-882d-9b41da50ecd6-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:roleRef roleURI="http://www.mainstcapital.com/role/ConsolidatedBalanceSheets" xlink:type="simple" xlink:href="main-20260630.xsd#ConsolidatedBalanceSheets"/>
  <link:calculationLink xlink:role="http://www.mainstcapital.com/role/ConsolidatedBalanceSheets" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_019e2207-0a8b-717b-ab14-473ff41e7a5e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_019e2207-0a8b-7225-b18f-7cb116892b63" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LongTermDebt"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019e2207-0a8b-717b-ab14-473ff41e7a5e" xlink:to="loc_us-gaap_LongTermDebt_019e2207-0a8b-7225-b18f-7cb116892b63" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableAndOtherAccruedLiabilities_019e2207-0a8b-7db9-9678-1c36cd84a334" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsPayableAndOtherAccruedLiabilities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019e2207-0a8b-717b-ab14-473ff41e7a5e" xlink:to="loc_us-gaap_AccountsPayableAndOtherAccruedLiabilities_019e2207-0a8b-7db9-9678-1c36cd84a334" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestPayableCurrentAndNoncurrent_019e2207-0a8b-7519-a259-acd215258f84" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestPayableCurrentAndNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019e2207-0a8b-717b-ab14-473ff41e7a5e" xlink:to="loc_us-gaap_InterestPayableCurrentAndNoncurrent_019e2207-0a8b-7519-a259-acd215258f84" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DividendsPayableCurrentAndNoncurrent_019e2207-0a8b-7bf4-b69e-c42d4540db18" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsPayableCurrentAndNoncurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019e2207-0a8b-717b-ab14-473ff41e7a5e" xlink:to="loc_us-gaap_DividendsPayableCurrentAndNoncurrent_019e2207-0a8b-7bf4-b69e-c42d4540db18" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_019e2207-0a8b-762b-ac6c-d71f8c3918d5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_019e2207-0a8b-717b-ab14-473ff41e7a5e" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_019e2207-0a8b-762b-ac6c-d71f8c3918d5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019e2207-0a8b-7719-a991-56c833751d17" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_019e2207-0a8b-725f-a8c6-48a7c70420e1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019e2207-0a8b-7719-a991-56c833751d17" xlink:to="loc_us-gaap_CommonStockValue_019e2207-0a8b-725f-a8c6-48a7c70420e1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_019e2207-0a8b-780d-87f2-aa5cfdc6bb50" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019e2207-0a8b-7719-a991-56c833751d17" xlink:to="loc_us-gaap_AdditionalPaidInCapital_019e2207-0a8b-780d-87f2-aa5cfdc6bb50" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019e2207-0a8b-7d7c-8507-a90748bde417" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_019e2207-0a8b-7719-a991-56c833751d17" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019e2207-0a8b-7d7c-8507-a90748bde417" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_019f6b1c-f789-73de-89dd-e76ae360acac" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentOwnedAtFairValue_019f6b1c-f789-7e25-b04d-08025703faf8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentOwnedAtFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019f6b1c-f789-73de-89dd-e76ae360acac" xlink:to="loc_us-gaap_InvestmentOwnedAtFairValue_019f6b1c-f789-7e25-b04d-08025703faf8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019f6b1c-f789-7137-9895-35cea6749206" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019f6b1c-f789-73de-89dd-e76ae360acac" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019f6b1c-f789-7137-9895-35cea6749206" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DividendAndInterestReceivable_019f6b1c-f789-74c8-bb43-7cfd6f8791d4" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendAndInterestReceivable"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019f6b1c-f789-73de-89dd-e76ae360acac" xlink:to="loc_us-gaap_DividendAndInterestReceivable_019f6b1c-f789-74c8-bb43-7cfd6f8791d4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssets_019fcc57-4d10-7755-ae70-6dfc827de310" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PrepaidExpenseAndOtherAssets"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019f6b1c-f789-73de-89dd-e76ae360acac" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssets_019fcc57-4d10-7755-ae70-6dfc827de310" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFinanceCostsNet_019fcc57-4d10-78d5-a7d3-f65cdb614b5a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredFinanceCostsNet"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019f6b1c-f789-73de-89dd-e76ae360acac" xlink:to="loc_us-gaap_DeferredFinanceCostsNet_019fcc57-4d10-78d5-a7d3-f65cdb614b5a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_019e2207-0a8b-7977-8e9b-7b3e7ac13bb5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_019e2207-0a8b-7ab4-a6e7-ed07c6c6df6e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Liabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019e2207-0a8b-7977-8e9b-7b3e7ac13bb5" xlink:to="loc_us-gaap_Liabilities_019e2207-0a8b-7ab4-a6e7-ed07c6c6df6e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommitmentsAndContingencies_019e2207-0a8b-794e-aaab-9a138342c009" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommitmentsAndContingencies"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019e2207-0a8b-7977-8e9b-7b3e7ac13bb5" xlink:to="loc_us-gaap_CommitmentsAndContingencies_019e2207-0a8b-794e-aaab-9a138342c009" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019e2207-0a8b-74a8-87cc-4920102f19b3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019e2207-0a8b-7977-8e9b-7b3e7ac13bb5" xlink:to="loc_us-gaap_StockholdersEquity_019e2207-0a8b-74a8-87cc-4920102f19b3" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mainstcapital.com/role/ConsolidatedStatementsofOperations" xlink:type="simple" xlink:href="main-20260630.xsd#ConsolidatedStatementsofOperations"/>
  <link:calculationLink xlink:role="http://www.mainstcapital.com/role/ConsolidatedStatementsofOperations" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInvestmentExpense_019e2207-0a8b-7969-9c99-699ae62fb56d" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentIncomeInvestmentExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GeneralAndAdministrativeExpense_019e2207-0a8b-77cd-899a-99a6c6efaa29" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GeneralAndAdministrativeExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeInvestmentExpense_019e2207-0a8b-7969-9c99-699ae62fb56d" xlink:to="loc_us-gaap_GeneralAndAdministrativeExpense_019e2207-0a8b-77cd-899a-99a6c6efaa29" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentCompanyExpenseOffsetArrangement_019e2207-0a8b-7752-bf39-3dc0ca05e69c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentCompanyExpenseOffsetArrangement"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeInvestmentExpense_019e2207-0a8b-7969-9c99-699ae62fb56d" xlink:to="loc_us-gaap_InvestmentCompanyExpenseOffsetArrangement_019e2207-0a8b-7752-bf39-3dc0ca05e69c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseOperating_019e2207-0a8b-74d5-89e6-6aebe5899688" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestExpenseOperating"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeInvestmentExpense_019e2207-0a8b-7969-9c99-699ae62fb56d" xlink:to="loc_us-gaap_InterestExpenseOperating_019e2207-0a8b-74d5-89e6-6aebe5899688" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AllocatedShareBasedCompensationExpense_019e2207-0a8b-70dd-8a4a-19d85ffc0eb0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AllocatedShareBasedCompensationExpense"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeInvestmentExpense_019e2207-0a8b-7969-9c99-699ae62fb56d" xlink:to="loc_us-gaap_AllocatedShareBasedCompensationExpense_019e2207-0a8b-70dd-8a4a-19d85ffc0eb0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SalariesWagesAndOfficersCompensation_019e2207-0a8b-7457-b666-64a942745866" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SalariesWagesAndOfficersCompensation"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeInvestmentExpense_019e2207-0a8b-7969-9c99-699ae62fb56d" xlink:to="loc_us-gaap_SalariesWagesAndOfficersCompensation_019e2207-0a8b-7457-b666-64a942745866" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeOperatingAfterExpenseAndTax_019e2207-0a8b-7047-baf5-4986b97f2c6c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentIncomeOperatingAfterExpenseAndTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetInvestmentIncome_019e2207-0a8b-7cc6-9ad7-9dec7e364f5d" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetInvestmentIncome"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeOperatingAfterExpenseAndTax_019e2207-0a8b-7047-baf5-4986b97f2c6c" xlink:to="loc_us-gaap_NetInvestmentIncome_019e2207-0a8b-7cc6-9ad7-9dec7e364f5d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentCompanyExciseTaxExpense_019e2207-0a8b-7ddd-afd4-6735fc369f44" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentCompanyExciseTaxExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeOperatingAfterExpenseAndTax_019e2207-0a8b-7047-baf5-4986b97f2c6c" xlink:to="loc_us-gaap_InvestmentCompanyExciseTaxExpense_019e2207-0a8b-7ddd-afd4-6735fc369f44" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentCompanyFederalAndStateIncomeAndOtherTaxExpense_019e2207-0a8b-79bd-8e06-6fe2614328a9" xlink:href="main-20260630.xsd#main_InvestmentCompanyFederalAndStateIncomeAndOtherTaxExpense"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeOperatingAfterExpenseAndTax_019e2207-0a8b-7047-baf5-4986b97f2c6c" xlink:to="loc_main_InvestmentCompanyFederalAndStateIncomeAndOtherTaxExpense_019e2207-0a8b-79bd-8e06-6fe2614328a9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetInvestmentIncome_019e2207-0a8b-7473-80f0-d3e669d8b36b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetInvestmentIncome"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossInvestmentIncomeOperating_019e2207-0a8b-76fc-ae75-015d18ff982d" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GrossInvestmentIncomeOperating"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetInvestmentIncome_019e2207-0a8b-7473-80f0-d3e669d8b36b" xlink:to="loc_us-gaap_GrossInvestmentIncomeOperating_019e2207-0a8b-76fc-ae75-015d18ff982d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInvestmentExpense_019e2207-0a8b-738c-a479-e86085a7e8fe" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentIncomeInvestmentExpense"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetInvestmentIncome_019e2207-0a8b-7473-80f0-d3e669d8b36b" xlink:to="loc_us-gaap_InvestmentIncomeInvestmentExpense_019e2207-0a8b-738c-a479-e86085a7e8fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019e2207-0a8b-7f0d-83a4-9a5cb77fee85" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeOperatingAfterExpenseAndTax_019e2207-0a8b-7675-9007-69fc368093c8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentIncomeOperatingAfterExpenseAndTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019e2207-0a8b-7f0d-83a4-9a5cb77fee85" xlink:to="loc_us-gaap_InvestmentIncomeOperatingAfterExpenseAndTax_019e2207-0a8b-7675-9007-69fc368093c8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtAndEquitySecuritiesRealizedGainLoss_019e2207-0a8b-72d1-a783-44e04195a8f9" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtAndEquitySecuritiesRealizedGainLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019e2207-0a8b-7f0d-83a4-9a5cb77fee85" xlink:to="loc_us-gaap_DebtAndEquitySecuritiesRealizedGainLoss_019e2207-0a8b-72d1-a783-44e04195a8f9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtAndEquitySecuritiesUnrealizedGainLoss_019e2207-0a8b-73e4-8fba-d197239486f5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtAndEquitySecuritiesUnrealizedGainLoss"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019e2207-0a8b-7f0d-83a4-9a5cb77fee85" xlink:to="loc_us-gaap_DebtAndEquitySecuritiesUnrealizedGainLoss_019e2207-0a8b-73e4-8fba-d197239486f5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefit_019e2207-0a8b-7633-92f3-ba996cd15d75" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefit"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019e2207-0a8b-7f0d-83a4-9a5cb77fee85" xlink:to="loc_us-gaap_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefit_019e2207-0a8b-7633-92f3-ba996cd15d75" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mainstcapital.com/role/ConsolidatedStatementsofCashFlows" xlink:type="simple" xlink:href="main-20260630.xsd#ConsolidatedStatementsofCashFlows"/>
  <link:calculationLink xlink:role="http://www.mainstcapital.com/role/ConsolidatedStatementsofCashFlows" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInterestPayableNet_019e2207-0a8b-79f5-ac5d-a7dd7d52c5ea" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInInterestPayableNet"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_us-gaap_IncreaseDecreaseInInterestPayableNet_019e2207-0a8b-79f5-ac5d-a7dd7d52c5ea" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfFinancingCosts_019e2207-0a8b-7f1b-bfba-a916f04d5a01" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AmortizationOfFinancingCosts"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_us-gaap_AmortizationOfFinancingCosts_019e2207-0a8b-7f1b-bfba-a916f04d5a01" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019e2207-0a8b-7abf-b4fb-903e91c96317" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_us-gaap_NetIncomeLoss_019e2207-0a8b-7abf-b4fb-903e91c96317" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_ProceedsFromSalesAndReturnOfCapitalOfEquityInvestmentsInPortfolioCompanies_019e2207-0a8b-7356-a3c6-555e55ce5490" xlink:href="main-20260630.xsd#main_ProceedsFromSalesAndReturnOfCapitalOfEquityInvestmentsInPortfolioCompanies"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_main_ProceedsFromSalesAndReturnOfCapitalOfEquityInvestmentsInPortfolioCompanies_019e2207-0a8b-7356-a3c6-555e55ce5490" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_PaymentInKindInterest_019e2207-0a8b-7e95-a881-829caf7e2ffd" xlink:href="main-20260630.xsd#main_PaymentInKindInterest"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_main_PaymentInKindInterest_019e2207-0a8b-7e95-a881-829caf7e2ffd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtAndEquitySecuritiesRealizedGainLoss_019e2207-0a8b-76b5-9717-427f90ab33f5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtAndEquitySecuritiesRealizedGainLoss"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_us-gaap_DebtAndEquitySecuritiesRealizedGainLoss_019e2207-0a8b-76b5-9717-427f90ab33f5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_CumulativeDividendsNonCash_019e2207-0a8b-7845-a072-d925cdf044d3" xlink:href="main-20260630.xsd#main_CumulativeDividendsNonCash"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_main_CumulativeDividendsNonCash_019e2207-0a8b-7845-a072-d925cdf044d3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtAndEquitySecuritiesUnrealizedGainLoss_019e2207-0a8b-7cdb-bf45-4fa5cee671bb" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtAndEquitySecuritiesUnrealizedGainLoss"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_us-gaap_DebtAndEquitySecuritiesUnrealizedGainLoss_019e2207-0a8b-7cdb-bf45-4fa5cee671bb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_ProceedsFromSalesAndRepaymentsOfDebtInvestmentsInPortfolioCompanies_019e2207-0a8b-7d3f-8013-7d44a73c7d6e" xlink:href="main-20260630.xsd#main_ProceedsFromSalesAndRepaymentsOfDebtInvestmentsInPortfolioCompanies"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_main_ProceedsFromSalesAndRepaymentsOfDebtInvestmentsInPortfolioCompanies_019e2207-0a8b-7d3f-8013-7d44a73c7d6e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_019e2207-0a8b-7316-bd9f-461417351379" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="10" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_019e2207-0a8b-7316-bd9f-461417351379" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_PaymentsToInvestmentsInPortfolioCompanies_019e2207-0a8b-7aa8-bd26-a992c38ace80" xlink:href="main-20260630.xsd#main_PaymentsToInvestmentsInPortfolioCompanies"/>
    <link:calculationArc order="11" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_main_PaymentsToInvestmentsInPortfolioCompanies_019e2207-0a8b-7aa8-bd26-a992c38ace80" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_IncreaseDecreaseInInterestAndDividendReceivableAndOtherAssets_019e2207-0a8b-7759-95b7-c03e51b4c66a" xlink:href="main-20260630.xsd#main_IncreaseDecreaseInInterestAndDividendReceivableAndOtherAssets"/>
    <link:calculationArc order="12" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_main_IncreaseDecreaseInInterestAndDividendReceivableAndOtherAssets_019e2207-0a8b-7759-95b7-c03e51b4c66a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_IncreaseDecreaseInDeferredFeesAndOther_019e2207-0a8b-7670-b8a4-e2b2057a7833" xlink:href="main-20260630.xsd#main_IncreaseDecreaseInDeferredFeesAndOther"/>
    <link:calculationArc order="13" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_main_IncreaseDecreaseInDeferredFeesAndOther_019e2207-0a8b-7670-b8a4-e2b2057a7833" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_019e2207-0a8b-745f-abd6-414f3e30b485" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensation"/>
    <link:calculationArc order="14" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_us-gaap_ShareBasedCompensation_019e2207-0a8b-745f-abd6-414f3e30b485" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_AccretionOfUnearnedIncome_019e2207-0a8b-7821-a6d8-222ee1c807ea" xlink:href="main-20260630.xsd#main_AccretionOfUnearnedIncome"/>
    <link:calculationArc order="15" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_main_AccretionOfUnearnedIncome_019e2207-0a8b-7821-a6d8-222ee1c807ea" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndOtherOperatingLiabilities_019e2207-0a8b-7d94-ad0b-cb3a43fe0736" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccountsPayableAndOtherOperatingLiabilities"/>
    <link:calculationArc order="16" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7469-ade2-abe9cbb7e236" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndOtherOperatingLiabilities_019e2207-0a8b-7d94-ad0b-cb3a43fe0736" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019e2207-0a8b-7e16-8d65-bfd5126c9c34" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e2207-0a8b-724f-9033-94ed78a9e312" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019e2207-0a8b-7e16-8d65-bfd5126c9c34" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e2207-0a8b-724f-9033-94ed78a9e312" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7914-8c6d-f5a1ffb3ea87" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_019e2207-0a8b-7e16-8d65-bfd5126c9c34" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_019e2207-0a8b-7914-8c6d-f5a1ffb3ea87" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e2207-0a8b-7c16-9c48-69832aa1c944" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_019e2207-0a8b-7e1e-8cfb-984539cadd27" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromIssuanceOfCommonStock"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e2207-0a8b-7c16-9c48-69832aa1c944" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_019e2207-0a8b-7e1e-8cfb-984539cadd27" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfUnsecuredDebt_019e2207-0a8b-76c2-b073-5b8d7d2d5186" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromIssuanceOfUnsecuredDebt"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e2207-0a8b-7c16-9c48-69832aa1c944" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfUnsecuredDebt_019e2207-0a8b-76c2-b073-5b8d7d2d5186" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfOrdinaryDividends_019e2207-0a8b-7c9b-afdf-01b416a99fca" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsOfOrdinaryDividends"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e2207-0a8b-7c16-9c48-69832aa1c944" xlink:to="loc_us-gaap_PaymentsOfOrdinaryDividends_019e2207-0a8b-7c9b-afdf-01b416a99fca" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromLinesOfCredit_019e2207-0a8b-7b92-99b2-d279cb5543e3" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromLinesOfCredit"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e2207-0a8b-7c16-9c48-69832aa1c944" xlink:to="loc_us-gaap_ProceedsFromLinesOfCredit_019e2207-0a8b-7b92-99b2-d279cb5543e3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLinesOfCredit_019e2207-0a8b-7a28-8bfd-14b253485e77" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RepaymentsOfLinesOfCredit"/>
    <link:calculationArc order="5" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e2207-0a8b-7c16-9c48-69832aa1c944" xlink:to="loc_us-gaap_RepaymentsOfLinesOfCredit_019e2207-0a8b-7a28-8bfd-14b253485e77" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_ProceedsFromDebtIssuancePremiumsNet_019e2207-0a8b-75a8-9424-bbc9a8b42427" xlink:href="main-20260630.xsd#main_ProceedsFromDebtIssuancePremiumsNet"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e2207-0a8b-7c16-9c48-69832aa1c944" xlink:to="loc_main_ProceedsFromDebtIssuancePremiumsNet_019e2207-0a8b-75a8-9424-bbc9a8b42427" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_019e6895-8a39-703e-aba9-4708f1ce44be" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_019e2207-0a8b-7c16-9c48-69832aa1c944" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_019e6895-8a39-703e-aba9-4708f1ce44be" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mainstcapital.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESScheduleofInvestmentIncomeDetails" xlink:type="simple" xlink:href="main-20260630.xsd#SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESScheduleofInvestmentIncomeDetails"/>
  <link:calculationLink xlink:role="http://www.mainstcapital.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESScheduleofInvestmentIncomeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossInvestmentIncomeOperating_019e2207-0b5f-77a1-ac0d-c5ad50b735c8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GrossInvestmentIncomeOperating"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInterest_019e2207-0b5f-78c8-a461-13db2ba71e6a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentIncomeInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GrossInvestmentIncomeOperating_019e2207-0b5f-77a1-ac0d-c5ad50b735c8" xlink:to="loc_us-gaap_InvestmentIncomeInterest_019e2207-0b5f-78c8-a461-13db2ba71e6a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeDividend_019e2207-0b5f-7efb-8c22-35aa306665a6" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentIncomeDividend"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GrossInvestmentIncomeOperating_019e2207-0b5f-77a1-ac0d-c5ad50b735c8" xlink:to="loc_us-gaap_InvestmentIncomeDividend_019e2207-0b5f-7efb-8c22-35aa306665a6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FeeIncome_019e2207-0b5f-704d-b4c7-714cd44dd634" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FeeIncome"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_GrossInvestmentIncomeOperating_019e2207-0b5f-77a1-ac0d-c5ad50b735c8" xlink:to="loc_us-gaap_FeeIncome_019e2207-0b5f-704d-b4c7-714cd44dd634" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mainstcapital.com/role/EXTERNALINVESTMENTMANAGERScheduleofBalanceSheetDetails" xlink:type="simple" xlink:href="main-20260630.xsd#EXTERNALINVESTMENTMANAGERScheduleofBalanceSheetDetails"/>
  <link:calculationLink xlink:role="http://www.mainstcapital.com/role/EXTERNALINVESTMENTMANAGERScheduleofBalanceSheetDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_019e2207-0b60-7747-89e9-bfc86eb8aeff" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DividendsPayableCurrentAndNoncurrent_019e2207-0b60-74e2-bbe2-e1d75b7c3ecd" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsPayableCurrentAndNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019e2207-0b60-7747-89e9-bfc86eb8aeff" xlink:to="loc_us-gaap_DividendsPayableCurrentAndNoncurrent_019e2207-0b60-74e2-bbe2-e1d75b7c3ecd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_019e2207-0b60-75c0-92c6-85ccf3b8320e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019e2207-0b60-7747-89e9-bfc86eb8aeff" xlink:to="loc_us-gaap_StockholdersEquity_019e2207-0b60-75c0-92c6-85ccf3b8320e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrentAndNoncurrent_019e2207-0b60-7c09-91fc-f9f463773fdb" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsPayableCurrentAndNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_019e2207-0b60-7747-89e9-bfc86eb8aeff" xlink:to="loc_us-gaap_AccountsPayableCurrentAndNoncurrent_019e2207-0b60-7c09-91fc-f9f463773fdb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_019e2207-0b60-7b11-9423-961ef84c3209" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNet_019e2207-0b60-747c-8db3-db43046f9abf" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsReceivableNet"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e2207-0b60-7b11-9423-961ef84c3209" xlink:to="loc_us-gaap_AccountsReceivableNet_019e2207-0b60-747c-8db3-db43046f9abf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_019e2207-0b60-7efb-a788-4030c4e7863b" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e2207-0b60-7b11-9423-961ef84c3209" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_019e2207-0b60-7efb-a788-4030c4e7863b" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mainstcapital.com/role/EXTERNALINVESTMENTMANAGERScheduleofStatementofOperationsDetails" xlink:type="simple" xlink:href="main-20260630.xsd#EXTERNALINVESTMENTMANAGERScheduleofStatementofOperationsDetails"/>
  <link:calculationLink xlink:role="http://www.mainstcapital.com/role/EXTERNALINVESTMENTMANAGERScheduleofStatementofOperationsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInvestmentExpense_019e2207-0b60-791d-b273-a3d931243da8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentIncomeInvestmentExpense"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingExpenses_019e2207-0b60-7aeb-aa86-f39d25a3fea7" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingExpenses"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeInvestmentExpense_019e2207-0b60-791d-b273-a3d931243da8" xlink:to="loc_us-gaap_OperatingExpenses_019e2207-0b60-7aeb-aa86-f39d25a3fea7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_OtherGeneralAndAdministrativeExpenseDirect_019e2207-0b60-705a-9120-ed6322145e3d" xlink:href="main-20260630.xsd#main_OtherGeneralAndAdministrativeExpenseDirect"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeInvestmentExpense_019e2207-0b60-791d-b273-a3d931243da8" xlink:to="loc_main_OtherGeneralAndAdministrativeExpenseDirect_019e2207-0b60-705a-9120-ed6322145e3d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingExpenses_019e2207-0b60-74cf-ac47-53c3dc0e8d20" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingExpenses"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherGeneralAndAdministrativeExpense_019e2207-0b60-7484-95c0-7d552fa35a65" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherGeneralAndAdministrativeExpense"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingExpenses_019e2207-0b60-74cf-ac47-53c3dc0e8d20" xlink:to="loc_us-gaap_OtherGeneralAndAdministrativeExpense_019e2207-0b60-7484-95c0-7d552fa35a65" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LaborAndRelatedExpense_019e2207-0b60-7985-9586-53520502cb34" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LaborAndRelatedExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingExpenses_019e2207-0b60-74cf-ac47-53c3dc0e8d20" xlink:to="loc_us-gaap_LaborAndRelatedExpense_019e2207-0b60-7985-9586-53520502cb34" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019e2207-0b60-76a0-8718-67c4f5e06f6e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019e2207-0b60-7573-b2c8-882098b02453" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019e2207-0b60-76a0-8718-67c4f5e06f6e" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019e2207-0b60-7573-b2c8-882098b02453" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_019e2207-0b60-785d-afbe-d6612ed312bc" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_019e2207-0b60-76a0-8718-67c4f5e06f6e" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_019e2207-0b60-785d-afbe-d6612ed312bc" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mainstcapital.com/role/DEBTScheduleofDebtDetails" xlink:type="simple" xlink:href="main-20260630.xsd#DEBTScheduleofDebtDetails"/>
  <link:calculationLink xlink:role="http://www.mainstcapital.com/role/DEBTScheduleofDebtDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_019e2207-0b60-78d8-a9d1-2581ba774f0e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LongTermDebt"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentCarryingAmount_019e2207-0b60-7615-90c2-e6c80e9d97d4" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtInstrumentCarryingAmount"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_019e2207-0b60-78d8-a9d1-2581ba774f0e" xlink:to="loc_us-gaap_DebtInstrumentCarryingAmount_019e2207-0b60-7615-90c2-e6c80e9d97d4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentUnamortizedDiscountPremiumAndDebtIssuanceCostsNet_019e2207-0b60-71b2-afc3-fd373cabdd2a" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtInstrumentUnamortizedDiscountPremiumAndDebtIssuanceCostsNet"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_019e2207-0b60-78d8-a9d1-2581ba774f0e" xlink:to="loc_us-gaap_DebtInstrumentUnamortizedDiscountPremiumAndDebtIssuanceCostsNet_019e2207-0b60-71b2-afc3-fd373cabdd2a" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mainstcapital.com/role/DEBTScheduleofMSCCFundingBalanceSheetDetails" xlink:type="simple" xlink:href="main-20260630.xsd#DEBTScheduleofMSCCFundingBalanceSheetDetails"/>
  <link:calculationLink xlink:role="http://www.mainstcapital.com/role/DEBTScheduleofMSCCFundingBalanceSheetDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_019e2207-0b60-713e-ab6f-6e0e5b4bb035" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentOwnedAtFairValue_019e2207-0b60-7753-bfbb-6f9cbf415204" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentOwnedAtFairValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e2207-0b60-713e-ab6f-6e0e5b4bb035" xlink:to="loc_us-gaap_InvestmentOwnedAtFairValue_019e2207-0b60-7753-bfbb-6f9cbf415204" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019e2207-0b60-7c77-9bb9-e5df5225549e" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e2207-0b60-713e-ab6f-6e0e5b4bb035" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_019e2207-0b60-7c77-9bb9-e5df5225549e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InterestAndDividendReceivableAndOtherAssets_019e2207-0b60-76d7-a838-4b56b6a90095" xlink:href="main-20260630.xsd#main_InterestAndDividendReceivableAndOtherAssets"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e2207-0b60-713e-ab6f-6e0e5b4bb035" xlink:to="loc_main_InterestAndDividendReceivableAndOtherAssets_019e2207-0b60-76d7-a838-4b56b6a90095" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFinanceCostsNet_019e2207-0b60-7b0a-9639-5d5e8dbd8213" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredFinanceCostsNet"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_019e2207-0b60-713e-ab6f-6e0e5b4bb035" xlink:to="loc_us-gaap_DeferredFinanceCostsNet_019e2207-0b60-7b0a-9639-5d5e8dbd8213" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mainstcapital.com/role/FINANCIALHIGHLIGHTSDetails" xlink:type="simple" xlink:href="main-20260630.xsd#FINANCIALHIGHLIGHTSDetails"/>
  <link:calculationLink xlink:role="http://www.mainstcapital.com/role/FINANCIALHIGHLIGHTSDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentCompanyInvestmentIncomeLossFromOperationsPerShare_019e2207-0b60-761f-9fde-9de90bf9fdac" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentCompanyInvestmentIncomeLossFromOperationsPerShare"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentCompanyNetRealizedGainLossOnInvestmentPerShare_019e2207-0b60-747a-b0bb-623895d64862" xlink:href="main-20260630.xsd#main_InvestmentCompanyNetRealizedGainLossOnInvestmentPerShare"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentCompanyInvestmentIncomeLossFromOperationsPerShare_019e2207-0b60-761f-9fde-9de90bf9fdac" xlink:to="loc_main_InvestmentCompanyNetRealizedGainLossOnInvestmentPerShare_019e2207-0b60-747a-b0bb-623895d64862" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentCompanyUnrealizedGainLossOnInvestmentPerShare_019e2207-0b60-79cd-87eb-1d8647cd3539" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentCompanyUnrealizedGainLossOnInvestmentPerShare"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentCompanyInvestmentIncomeLossFromOperationsPerShare_019e2207-0b60-761f-9fde-9de90bf9fdac" xlink:to="loc_us-gaap_InvestmentCompanyUnrealizedGainLossOnInvestmentPerShare_019e2207-0b60-79cd-87eb-1d8647cd3539" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentCompanyInvestmentIncomeLossPerShare_019e2207-0b60-7c3c-b7e4-aa62b3057968" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentCompanyInvestmentIncomeLossPerShare"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentCompanyInvestmentIncomeLossFromOperationsPerShare_019e2207-0b60-761f-9fde-9de90bf9fdac" xlink:to="loc_us-gaap_InvestmentCompanyInvestmentIncomeLossPerShare_019e2207-0b60-7c3c-b7e4-aa62b3057968" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentCompanyIncomeTaxBenefitProvisionOnNetRealizedGainAndNetUnrealizedAppreciationPerShare_019e2207-0b60-75d3-ac76-73c8b07badf5" xlink:href="main-20260630.xsd#main_InvestmentCompanyIncomeTaxBenefitProvisionOnNetRealizedGainAndNetUnrealizedAppreciationPerShare"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentCompanyInvestmentIncomeLossFromOperationsPerShare_019e2207-0b60-761f-9fde-9de90bf9fdac" xlink:to="loc_main_InvestmentCompanyIncomeTaxBenefitProvisionOnNetRealizedGainAndNetUnrealizedAppreciationPerShare_019e2207-0b60-75d3-ac76-73c8b07badf5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentCompanyDistributionToShareholdersPerShare_019e2207-0b60-7035-bf7a-6b785b4bf3b5" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentCompanyDistributionToShareholdersPerShare"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentCompanyDividendDistributionToShareholdersPerShare_019e2207-0b60-7223-b6b2-70e9ad029231" xlink:href="main-20260630.xsd#main_InvestmentCompanyDividendDistributionToShareholdersPerShare"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentCompanyDistributionToShareholdersPerShare_019e2207-0b60-7035-bf7a-6b785b4bf3b5" xlink:to="loc_main_InvestmentCompanyDividendDistributionToShareholdersPerShare_019e2207-0b60-7223-b6b2-70e9ad029231" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mainstcapital.com/role/DIVIDENDSDISTRIBUTIONSANDTAXABLEINCOMEScheduleofReconciliationtoTaxableIncomeandtoTotalDistributionsDeclaredtoCommonStockholdersDetails" xlink:type="simple" xlink:href="main-20260630.xsd#DIVIDENDSDISTRIBUTIONSANDTAXABLEINCOMEScheduleofReconciliationtoTaxableIncomeandtoTotalDistributionsDeclaredtoCommonStockholdersDetails"/>
  <link:calculationLink xlink:role="http://www.mainstcapital.com/role/DIVIDENDSDISTRIBUTIONSANDTAXABLEINCOMEScheduleofReconciliationtoTaxableIncomeandtoTotalDistributionsDeclaredtoCommonStockholdersDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentCompanyTaxBasisDistributionsAccruedOrPaidToCommonStockholders_019e2207-0b60-77fb-bb70-b58db50d992e" xlink:href="main-20260630.xsd#main_InvestmentCompanyTaxBasisDistributionsAccruedOrPaidToCommonStockholders"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentCompanyTaxBasisDividendsPaidOrPayable_019e2207-0b60-75ed-9de4-41016a0def34" xlink:href="main-20260630.xsd#main_InvestmentCompanyTaxBasisDividendsPaidOrPayable"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentCompanyTaxBasisDistributionsAccruedOrPaidToCommonStockholders_019e2207-0b60-77fb-bb70-b58db50d992e" xlink:to="loc_main_InvestmentCompanyTaxBasisDividendsPaidOrPayable_019e2207-0b60-75ed-9de4-41016a0def34" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentCompanyTaxBasisTaxableIncomeEarnedPriorToPeriodEndAndCarriedForwardForDistributionNextPeriod_019e2207-0b60-7c0f-8f9e-3ceb8b6e77cf" xlink:href="main-20260630.xsd#main_InvestmentCompanyTaxBasisTaxableIncomeEarnedPriorToPeriodEndAndCarriedForwardForDistributionNextPeriod"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentCompanyTaxBasisDistributionsAccruedOrPaidToCommonStockholders_019e2207-0b60-77fb-bb70-b58db50d992e" xlink:to="loc_main_InvestmentCompanyTaxBasisTaxableIncomeEarnedPriorToPeriodEndAndCarriedForwardForDistributionNextPeriod_019e2207-0b60-7c0f-8f9e-3ceb8b6e77cf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentCompanyTaxBasisNetIncomeLossAttributableToParentEstimated_019e2207-0b60-7bb7-908c-518c6d6aac00" xlink:href="main-20260630.xsd#main_InvestmentCompanyTaxBasisNetIncomeLossAttributableToParentEstimated"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentCompanyTaxBasisDistributionsAccruedOrPaidToCommonStockholders_019e2207-0b60-77fb-bb70-b58db50d992e" xlink:to="loc_main_InvestmentCompanyTaxBasisNetIncomeLossAttributableToParentEstimated_019e2207-0b60-7bb7-908c-518c6d6aac00" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentCompanyTaxBasisTaxableIncomeEarnedInPriorYearAndCarriedForwardForDistributionInCurrentYear_019e2207-0b60-7327-ac7e-7ab4cd2bf57a" xlink:href="main-20260630.xsd#main_InvestmentCompanyTaxBasisTaxableIncomeEarnedInPriorYearAndCarriedForwardForDistributionInCurrentYear"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentCompanyTaxBasisDistributionsAccruedOrPaidToCommonStockholders_019e2207-0b60-77fb-bb70-b58db50d992e" xlink:to="loc_main_InvestmentCompanyTaxBasisTaxableIncomeEarnedInPriorYearAndCarriedForwardForDistributionInCurrentYear_019e2207-0b60-7327-ac7e-7ab4cd2bf57a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentCompanyTaxBasisNetIncomeLossAttributableToParentEstimated_019e2207-0b60-7635-b3c7-7cab14733896" xlink:href="main-20260630.xsd#main_InvestmentCompanyTaxBasisNetIncomeLossAttributableToParentEstimated"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019e2207-0b60-7140-af2e-ea327d241a9c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentCompanyTaxBasisNetIncomeLossAttributableToParentEstimated_019e2207-0b60-7635-b3c7-7cab14733896" xlink:to="loc_us-gaap_NetIncomeLoss_019e2207-0b60-7140-af2e-ea327d241a9c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentCompanyTaxBasisBookTaxDifferenceFromShareBasedCompensationExpenseIncreaseDecreaseInTaxableIncome_019e2207-0b60-7caf-83ba-80a5b2f6f38c" xlink:href="main-20260630.xsd#main_InvestmentCompanyTaxBasisBookTaxDifferenceFromShareBasedCompensationExpenseIncreaseDecreaseInTaxableIncome"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentCompanyTaxBasisNetIncomeLossAttributableToParentEstimated_019e2207-0b60-7635-b3c7-7cab14733896" xlink:to="loc_main_InvestmentCompanyTaxBasisBookTaxDifferenceFromShareBasedCompensationExpenseIncreaseDecreaseInTaxableIncome_019e2207-0b60-7caf-83ba-80a5b2f6f38c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentCompanyTaxBasisUnrealizedGainLossNotCurrentlyTaxableDeductible_019e2207-0b60-702e-a800-7e7f0609160c" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentCompanyTaxBasisUnrealizedGainLossNotCurrentlyTaxableDeductible"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentCompanyTaxBasisNetIncomeLossAttributableToParentEstimated_019e2207-0b60-7635-b3c7-7cab14733896" xlink:to="loc_us-gaap_InvestmentCompanyTaxBasisUnrealizedGainLossNotCurrentlyTaxableDeductible_019e2207-0b60-702e-a800-7e7f0609160c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentCompanyTaxBasisIncomeTaxProvision_019e2207-0b60-73c0-92b5-8ac87f8c0e84" xlink:href="main-20260630.xsd#main_InvestmentCompanyTaxBasisIncomeTaxProvision"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentCompanyTaxBasisNetIncomeLossAttributableToParentEstimated_019e2207-0b60-7635-b3c7-7cab14733896" xlink:to="loc_main_InvestmentCompanyTaxBasisIncomeTaxProvision_019e2207-0b60-73c0-92b5-8ac87f8c0e84" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentCompanyTaxBasisPreTaxBookIncomeLossNotConsolidatedForTaxPurposesIncreaseDecreaseInTaxableIncome_019e2207-0b60-7aa5-96ff-e50ed4be7eed" xlink:href="main-20260630.xsd#main_InvestmentCompanyTaxBasisPreTaxBookIncomeLossNotConsolidatedForTaxPurposesIncreaseDecreaseInTaxableIncome"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentCompanyTaxBasisNetIncomeLossAttributableToParentEstimated_019e2207-0b60-7635-b3c7-7cab14733896" xlink:to="loc_main_InvestmentCompanyTaxBasisPreTaxBookIncomeLossNotConsolidatedForTaxPurposesIncreaseDecreaseInTaxableIncome_019e2207-0b60-7aa5-96ff-e50ed4be7eed" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentCompanyTaxBasisBookIncomeAndTaxIncomeDifferencesIncreaseDecreaseInTaxableIncome_019e2207-0b60-797e-8412-58e13e97dc76" xlink:href="main-20260630.xsd#main_InvestmentCompanyTaxBasisBookIncomeAndTaxIncomeDifferencesIncreaseDecreaseInTaxableIncome"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentCompanyTaxBasisNetIncomeLossAttributableToParentEstimated_019e2207-0b60-7635-b3c7-7cab14733896" xlink:to="loc_main_InvestmentCompanyTaxBasisBookIncomeAndTaxIncomeDifferencesIncreaseDecreaseInTaxableIncome_019e2207-0b60-797e-8412-58e13e97dc76" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.mainstcapital.com/role/DIVIDENDSDISTRIBUTIONSANDTAXABLEINCOMEScheduleofNetInvestmentIncomeRelatedTaxesDetails" xlink:type="simple" xlink:href="main-20260630.xsd#DIVIDENDSDISTRIBUTIONSANDTAXABLEINCOMEScheduleofNetInvestmentIncomeRelatedTaxesDetails"/>
  <link:calculationLink xlink:role="http://www.mainstcapital.com/role/DIVIDENDSDISTRIBUTIONSANDTAXABLEINCOMEScheduleofNetInvestmentIncomeRelatedTaxesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_main_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefitCurrent_019e2207-0b60-7f07-a5b8-42e4555f14d4" xlink:href="main-20260630.xsd#main_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefitCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_RealizedGainLossInvestmentAndDerivativeOperatingFederalTaxExpenseBenefitCurrent_019e2207-0b60-7760-9489-a7bb0fe48f73" xlink:href="main-20260630.xsd#main_RealizedGainLossInvestmentAndDerivativeOperatingFederalTaxExpenseBenefitCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefitCurrent_019e2207-0b60-7f07-a5b8-42e4555f14d4" xlink:to="loc_main_RealizedGainLossInvestmentAndDerivativeOperatingFederalTaxExpenseBenefitCurrent_019e2207-0b60-7760-9489-a7bb0fe48f73" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentIncomeOperatingTaxExpenseBenefitCurrent_019e2207-0b60-7929-a559-b75e9d736b26" xlink:href="main-20260630.xsd#main_InvestmentIncomeOperatingTaxExpenseBenefitCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentIncomeOperatingFederalTaxExpenseBenefitCurrent_019e2207-0b60-7292-8c48-e74b1dd46ccc" xlink:href="main-20260630.xsd#main_InvestmentIncomeOperatingFederalTaxExpenseBenefitCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentIncomeOperatingTaxExpenseBenefitCurrent_019e2207-0b60-7929-a559-b75e9d736b26" xlink:to="loc_main_InvestmentIncomeOperatingFederalTaxExpenseBenefitCurrent_019e2207-0b60-7292-8c48-e74b1dd46ccc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentIncomeOperatingStateAndOtherTaxExpenseBenefitCurrent_019e2207-0b60-7329-857d-37ef646b6c09" xlink:href="main-20260630.xsd#main_InvestmentIncomeOperatingStateAndOtherTaxExpenseBenefitCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentIncomeOperatingTaxExpenseBenefitCurrent_019e2207-0b60-7929-a559-b75e9d736b26" xlink:to="loc_main_InvestmentIncomeOperatingStateAndOtherTaxExpenseBenefitCurrent_019e2207-0b60-7329-857d-37ef646b6c09" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentCompanyExciseTaxExpense_019e2207-0b60-75ea-8620-1e8862cb27c8" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentCompanyExciseTaxExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentIncomeOperatingTaxExpenseBenefitCurrent_019e2207-0b60-7929-a559-b75e9d736b26" xlink:to="loc_us-gaap_InvestmentCompanyExciseTaxExpense_019e2207-0b60-75ea-8620-1e8862cb27c8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_RealizedGainLossInvestmentAndDerivativeOperatingDeferredTaxExpenseBenefit_019e2207-0b60-77e0-bc47-fc42cf2028de" xlink:href="main-20260630.xsd#main_RealizedGainLossInvestmentAndDerivativeOperatingDeferredTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_RealizedGainLossInvestmentAndDerivativeOperatingDeferredFederalTaxExpenseBenefit_019e2207-0b60-744c-8335-dba13e0149e3" xlink:href="main-20260630.xsd#main_RealizedGainLossInvestmentAndDerivativeOperatingDeferredFederalTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_RealizedGainLossInvestmentAndDerivativeOperatingDeferredTaxExpenseBenefit_019e2207-0b60-77e0-bc47-fc42cf2028de" xlink:to="loc_main_RealizedGainLossInvestmentAndDerivativeOperatingDeferredFederalTaxExpenseBenefit_019e2207-0b60-744c-8335-dba13e0149e3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_RealizedGainLossInvestmentAndDerivativeOperatingDeferredStateAndOtherTaxExpenseBenefit_019e2207-0b60-7533-afc3-cfcd8e2817f8" xlink:href="main-20260630.xsd#main_RealizedGainLossInvestmentAndDerivativeOperatingDeferredStateAndOtherTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_RealizedGainLossInvestmentAndDerivativeOperatingDeferredTaxExpenseBenefit_019e2207-0b60-77e0-bc47-fc42cf2028de" xlink:to="loc_main_RealizedGainLossInvestmentAndDerivativeOperatingDeferredStateAndOtherTaxExpenseBenefit_019e2207-0b60-7533-afc3-cfcd8e2817f8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeOperatingTaxExpenseBenefit_019e2207-0b60-7885-a63a-f3b65782cc5d" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentIncomeOperatingTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentIncomeOperatingTaxExpenseBenefitCurrent_019e2207-0b60-7824-a196-c939cfbf639a" xlink:href="main-20260630.xsd#main_InvestmentIncomeOperatingTaxExpenseBenefitCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeOperatingTaxExpenseBenefit_019e2207-0b60-7885-a63a-f3b65782cc5d" xlink:to="loc_main_InvestmentIncomeOperatingTaxExpenseBenefitCurrent_019e2207-0b60-7824-a196-c939cfbf639a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentIncomeOperatingDeferredTaxExpenseBenefit_019e2207-0b60-7fc7-ac13-56c481559770" xlink:href="main-20260630.xsd#main_InvestmentIncomeOperatingDeferredTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InvestmentIncomeOperatingTaxExpenseBenefit_019e2207-0b60-7885-a63a-f3b65782cc5d" xlink:to="loc_main_InvestmentIncomeOperatingDeferredTaxExpenseBenefit_019e2207-0b60-7fc7-ac13-56c481559770" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentIncomeOperatingDeferredTaxExpenseBenefit_019e2207-0b60-7393-bc7b-5a0ab376a866" xlink:href="main-20260630.xsd#main_InvestmentIncomeOperatingDeferredTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentIncomeOperatingDeferredFederalTaxExpenseBenefit_019e2207-0b60-7057-a647-9b95525f176e" xlink:href="main-20260630.xsd#main_InvestmentIncomeOperatingDeferredFederalTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentIncomeOperatingDeferredTaxExpenseBenefit_019e2207-0b60-7393-bc7b-5a0ab376a866" xlink:to="loc_main_InvestmentIncomeOperatingDeferredFederalTaxExpenseBenefit_019e2207-0b60-7057-a647-9b95525f176e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentIncomeOperatingDeferredStateAndOtherTaxExpenseBenefit_019e2207-0b60-7645-a9a8-a93e82bd3bd4" xlink:href="main-20260630.xsd#main_InvestmentIncomeOperatingDeferredStateAndOtherTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentIncomeOperatingDeferredTaxExpenseBenefit_019e2207-0b60-7393-bc7b-5a0ab376a866" xlink:to="loc_main_InvestmentIncomeOperatingDeferredStateAndOtherTaxExpenseBenefit_019e2207-0b60-7645-a9a8-a93e82bd3bd4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_InvestmentCompanyIncomeTaxExpenseBenefit_019e2207-0b60-7c5d-9edb-96cc9b955ce3" xlink:href="main-20260630.xsd#main_InvestmentCompanyIncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeOperatingTaxExpenseBenefit_019e2207-0b60-74c6-90f7-38dc27548731" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentIncomeOperatingTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentCompanyIncomeTaxExpenseBenefit_019e2207-0b60-7c5d-9edb-96cc9b955ce3" xlink:to="loc_us-gaap_InvestmentIncomeOperatingTaxExpenseBenefit_019e2207-0b60-74c6-90f7-38dc27548731" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefit_019e2207-0b60-7ecb-bd01-d3f629d46ef0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_main_InvestmentCompanyIncomeTaxExpenseBenefit_019e2207-0b60-7c5d-9edb-96cc9b955ce3" xlink:to="loc_us-gaap_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefit_019e2207-0b60-7ecb-bd01-d3f629d46ef0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefit_019e2207-0b60-742c-bb3d-568d287f97fa" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefitCurrent_019e2207-0b60-7268-afa3-fdc1c169fd29" xlink:href="main-20260630.xsd#main_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefitCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefit_019e2207-0b60-742c-bb3d-568d287f97fa" xlink:to="loc_main_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefitCurrent_019e2207-0b60-7268-afa3-fdc1c169fd29" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_main_RealizedGainLossInvestmentAndDerivativeOperatingDeferredTaxExpenseBenefit_019e2207-0b60-7982-8783-7d8e6d0df18a" xlink:href="main-20260630.xsd#main_RealizedGainLossInvestmentAndDerivativeOperatingDeferredTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_RealizedGainLossInvestmentAndDerivativeOperatingTaxExpenseBenefit_019e2207-0b60-742c-bb3d-568d287f97fa" xlink:to="loc_main_RealizedGainLossInvestmentAndDerivativeOperatingDeferredTaxExpenseBenefit_019e2207-0b60-7982-8783-7d8e6d0df18a" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
