<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.22.0.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>512</ContextCount>
  <ElementCount>583</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>123</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>10</UnitCount>
  <MyReports>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0001001 - Document - Cover Page</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/CoverPage</Role>
      <ShortName>Cover Page</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0002002 - Document - Audit Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/AuditInformation</Role>
      <ShortName>Audit Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>1001003 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/ConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Uncategorized</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>1002004 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/ConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>1003005 - Statement - Consolidated Statements of Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/ConsolidatedStatementsofIncome</Role>
      <ShortName>Consolidated Statements of Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>1004006 - Statement - Consolidated Statements of Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/ConsolidatedStatementsofComprehensiveIncome</Role>
      <ShortName>Consolidated Statements of Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>1005007 - Statement - Consolidated Statements of Changes in Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/ConsolidatedStatementsofChangesinStockholdersEquity</Role>
      <ShortName>Consolidated Statements of Changes in Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>1006008 - Statement - Consolidated Statements of Changes in Stockholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/ConsolidatedStatementsofChangesinStockholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statements of Changes in Stockholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>1007009 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/ConsolidatedStatementsofCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>2101101 - Disclosure - Nature of Business and Basis of Presentation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/NatureofBusinessandBasisofPresentation</Role>
      <ShortName>Nature of Business and Basis of Presentation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>2108102 - Disclosure - Cash and Cash Equivalents</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/CashandCashEquivalents</Role>
      <ShortName>Cash and Cash Equivalents</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>2109103 - Disclosure - Investment Securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/InvestmentSecurities</Role>
      <ShortName>Investment Securities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>2115104 - Disclosure - SBA-PPP Loans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/SBAPPPLoans</Role>
      <ShortName>SBA-PPP Loans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>2117105 - Disclosure - Portfolio Loans Receivable</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/PortfolioLoansReceivable</Role>
      <ShortName>Portfolio Loans Receivable</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>2128106 - Disclosure - Premises and Equipment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/PremisesandEquipment</Role>
      <ShortName>Premises and Equipment</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>2131107 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/Leases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>2135108 - Disclosure - Derivative Financial Instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/DerivativeFinancialInstruments</Role>
      <ShortName>Derivative Financial Instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>2138109 - Disclosure - Interest-Bearing Deposits</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/InterestBearingDeposits</Role>
      <ShortName>Interest-Bearing Deposits</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>2142110 - Disclosure - Borrowed Funds</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/BorrowedFunds</Role>
      <ShortName>Borrowed Funds</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>2146111 - Disclosure - Retirement Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/RetirementPlans</Role>
      <ShortName>Retirement Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>2148112 - Disclosure - Related-Party Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/RelatedPartyTransactions</Role>
      <ShortName>Related-Party Transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>2152113 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>2157114 - Disclosure - Capital Standards</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/CapitalStandards</Role>
      <ShortName>Capital Standards</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>2160115 - Disclosure - Stock-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/StockBasedCompensation</Role>
      <ShortName>Stock-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>2168116 - Disclosure - Parent Company Financial Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/ParentCompanyFinancialInformation</Role>
      <ShortName>Parent Company Financial Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>2173117 - Disclosure - Fair Value</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/FairValue</Role>
      <ShortName>Fair Value</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>2179118 - Disclosure - Segments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/Segments</Role>
      <ShortName>Segments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>2182119 - Disclosure - Litigation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/Litigation</Role>
      <ShortName>Litigation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>2202201 - Disclosure - Nature of Business and Basis of Presentation (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/NatureofBusinessandBasisofPresentationPolicies</Role>
      <ShortName>Nature of Business and Basis of Presentation (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>2303301 - Disclosure - Nature of Business and Basis of Presentation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/NatureofBusinessandBasisofPresentationTables</Role>
      <ShortName>Nature of Business and Basis of Presentation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/NatureofBusinessandBasisofPresentation</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>2310302 - Disclosure - Investment Securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/InvestmentSecuritiesTables</Role>
      <ShortName>Investment Securities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/InvestmentSecurities</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>2318303 - Disclosure - Portfolio Loans Receivable (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/PortfolioLoansReceivableTables</Role>
      <ShortName>Portfolio Loans Receivable (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/PortfolioLoansReceivable</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>2329304 - Disclosure - Premises and Equipment (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/PremisesandEquipmentTables</Role>
      <ShortName>Premises and Equipment (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/PremisesandEquipment</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>2332305 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/LeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/Leases</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>2336306 - Disclosure - Derivative Financial Instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/DerivativeFinancialInstrumentsTables</Role>
      <ShortName>Derivative Financial Instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/DerivativeFinancialInstruments</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>2339307 - Disclosure - Interest-Bearing Deposits (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/InterestBearingDepositsTables</Role>
      <ShortName>Interest-Bearing Deposits (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/InterestBearingDeposits</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>2343308 - Disclosure - Borrowed Funds (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/BorrowedFundsTables</Role>
      <ShortName>Borrowed Funds (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/BorrowedFunds</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>2349309 - Disclosure - Related-Party Transactions (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/RelatedPartyTransactionsTables</Role>
      <ShortName>Related-Party Transactions (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/RelatedPartyTransactions</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>2353310 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/IncomeTaxes</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>2358311 - Disclosure - Capital Standards (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/CapitalStandardsTables</Role>
      <ShortName>Capital Standards (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/CapitalStandards</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>2361312 - Disclosure - Stock-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/StockBasedCompensationTables</Role>
      <ShortName>Stock-Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/StockBasedCompensation</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>2369313 - Disclosure - Parent Company Financial Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/ParentCompanyFinancialInformationTables</Role>
      <ShortName>Parent Company Financial Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/ParentCompanyFinancialInformation</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>2374314 - Disclosure - Fair Value (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/FairValueTables</Role>
      <ShortName>Fair Value (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/FairValue</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>2380315 - Disclosure - Segments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/SegmentsTables</Role>
      <ShortName>Segments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/Segments</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>2404401 - Disclosure - Nature of Business and Basis of Presentation - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/NatureofBusinessandBasisofPresentationAdditionalInformationDetails</Role>
      <ShortName>Nature of Business and Basis of Presentation - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>2405402 - Disclosure - Nature of Business and Basis of Presentation - Loan Deferral (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/NatureofBusinessandBasisofPresentationLoanDeferralDetails</Role>
      <ShortName>Nature of Business and Basis of Presentation - Loan Deferral (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>2406403 - Disclosure - Nature of Business and Basis of Presentation - Earnings per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/NatureofBusinessandBasisofPresentationEarningsperShareDetails</Role>
      <ShortName>Nature of Business and Basis of Presentation - Earnings per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>2407404 - Disclosure - Nature of Business and Basis of Presentation - Comprehensive Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/NatureofBusinessandBasisofPresentationComprehensiveIncomeDetails</Role>
      <ShortName>Nature of Business and Basis of Presentation - Comprehensive Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>2411405 - Disclosure - Investment Securities - Amortized cost to Estimated Fair Value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/InvestmentSecuritiesAmortizedcosttoEstimatedFairValueDetails</Role>
      <ShortName>Investment Securities - Amortized cost to Estimated Fair Value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>2412406 - Disclosure - Investment Securities - Unrealized Losses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/InvestmentSecuritiesUnrealizedLossesDetails</Role>
      <ShortName>Investment Securities - Unrealized Losses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>2413407 - Disclosure - Investment Securities - Pledged Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/InvestmentSecuritiesPledgedSecuritiesDetails</Role>
      <ShortName>Investment Securities - Pledged Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>2414408 - Disclosure - Investment Securities - By Maturity Dates (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/InvestmentSecuritiesByMaturityDatesDetails</Role>
      <ShortName>Investment Securities - By Maturity Dates (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>2416409 - Disclosure - SBA-PPP Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/SBAPPPLoansDetails</Role>
      <ShortName>SBA-PPP Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/SBAPPPLoans</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>2419410 - Disclosure - Portfolio Loans Receivable - Classification of Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/PortfolioLoansReceivableClassificationofLoansDetails</Role>
      <ShortName>Portfolio Loans Receivable - Classification of Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>2420411 - Disclosure - Portfolio Loans Receivable - Accretable Discount (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/PortfolioLoansReceivableAccretableDiscountDetails</Role>
      <ShortName>Portfolio Loans Receivable - Accretable Discount (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>2421412 - Disclosure - Portfolio Loans Receivable - Allowance for Loan Losses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/PortfolioLoansReceivableAllowanceforLoanLossesDetails</Role>
      <ShortName>Portfolio Loans Receivable - Allowance for Loan Losses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>2422413 - Disclosure - Portfolio Loans Receivable - Past Due Financing Receivable (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/PortfolioLoansReceivablePastDueFinancingReceivableDetails</Role>
      <ShortName>Portfolio Loans Receivable - Past Due Financing Receivable (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>2423414 - Disclosure - Portfolio Loans Receivable - Impaired Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/PortfolioLoansReceivableImpairedLoansDetails</Role>
      <ShortName>Portfolio Loans Receivable - Impaired Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>2424415 - Disclosure - Portfolio Loans Receivable - Credit Quality Indicators (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/PortfolioLoansReceivableCreditQualityIndicatorsDetails</Role>
      <ShortName>Portfolio Loans Receivable - Credit Quality Indicators (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>2425416 - Disclosure - Portfolio Loans Receivable - Trouble Debt Restructuring (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/PortfolioLoansReceivableTroubleDebtRestructuringDetails</Role>
      <ShortName>Portfolio Loans Receivable - Trouble Debt Restructuring (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>2426417 - Disclosure - Portfolio Loans Receivable - Outstanding Loan Commitments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/PortfolioLoansReceivableOutstandingLoanCommitmentsDetails</Role>
      <ShortName>Portfolio Loans Receivable - Outstanding Loan Commitments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>2427418 - Disclosure - Portfolio Loans Receivable - Activity in Allowance for Loan Losses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/PortfolioLoansReceivableActivityinAllowanceforLoanLossesDetails</Role>
      <ShortName>Portfolio Loans Receivable - Activity in Allowance for Loan Losses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>2430419 - Disclosure - Premises and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/PremisesandEquipmentDetails</Role>
      <ShortName>Premises and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/PremisesandEquipmentTables</ParentRole>
      <Position>63</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>2433420 - Disclosure - Leases - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/LeasesAdditionalInformationDetails</Role>
      <ShortName>Leases - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>2434421 - Disclosure - Leases - Assets and Liabilities and Lease Payment Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/LeasesAssetsandLiabilitiesandLeasePaymentObligationsDetails</Role>
      <ShortName>Leases - Assets and Liabilities and Lease Payment Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>2437422 - Disclosure - Derivative Financial Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/DerivativeFinancialInstrumentsDetails</Role>
      <ShortName>Derivative Financial Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/DerivativeFinancialInstrumentsTables</ParentRole>
      <Position>66</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>2440423 - Disclosure - Interest-Bearing Deposits - Major Categories (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/InterestBearingDepositsMajorCategoriesDetails</Role>
      <ShortName>Interest-Bearing Deposits - Major Categories (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>2441424 - Disclosure - Interest-Bearing Deposits - Maturities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/InterestBearingDepositsMaturitiesDetails</Role>
      <ShortName>Interest-Bearing Deposits - Maturities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>2444425 - Disclosure - Borrowed Funds - Schedule of Borrowings (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/BorrowedFundsScheduleofBorrowingsDetails</Role>
      <ShortName>Borrowed Funds - Schedule of Borrowings (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>2445426 - Disclosure - Borrowed Funds - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/BorrowedFundsAdditionalInformationDetails</Role>
      <ShortName>Borrowed Funds - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>2447427 - Disclosure - Retirement Plans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/RetirementPlansDetails</Role>
      <ShortName>Retirement Plans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/RetirementPlans</ParentRole>
      <Position>71</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>2450428 - Disclosure - Related-Party Transactions - Activity in Related Party Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/RelatedPartyTransactionsActivityinRelatedPartyLoansDetails</Role>
      <ShortName>Related-Party Transactions - Activity in Related Party Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>2451429 - Disclosure - Related-Party Transactions - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/RelatedPartyTransactionsAdditionalInformationDetails</Role>
      <ShortName>Related-Party Transactions - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>2454430 - Disclosure - Income Taxes - Components of Income Tax Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/IncomeTaxesComponentsofIncomeTaxExpenseDetails</Role>
      <ShortName>Income Taxes - Components of Income Tax Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>2455431 - Disclosure - Income Taxes - Components of Net Deferred Tax Asset (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/IncomeTaxesComponentsofNetDeferredTaxAssetDetails</Role>
      <ShortName>Income Taxes - Components of Net Deferred Tax Asset (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>2456432 - Disclosure - Income Taxes - Reconciliation of Federal Tax Rate to the Effective Rate (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/IncomeTaxesReconciliationofFederalTaxRatetotheEffectiveRateDetails</Role>
      <ShortName>Income Taxes - Reconciliation of Federal Tax Rate to the Effective Rate (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>2459433 - Disclosure - Capital Standards (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/CapitalStandardsDetails</Role>
      <ShortName>Capital Standards (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/CapitalStandardsTables</ParentRole>
      <Position>77</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>2462434 - Disclosure - Stock-Based Compensation - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/StockBasedCompensationAdditionalInformationDetails</Role>
      <ShortName>Stock-Based Compensation - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>2463435 - Disclosure - Stock-Based Compensation - Stock Options Outstanding (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/StockBasedCompensationStockOptionsOutstandingDetails</Role>
      <ShortName>Stock-Based Compensation - Stock Options Outstanding (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>2464436 - Disclosure - Stock-Based Compensation - Stock Option Summary (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/StockBasedCompensationStockOptionSummaryDetails</Role>
      <ShortName>Stock-Based Compensation - Stock Option Summary (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>2465437 - Disclosure - Stock-Based Compensation - Stock Option Pricing Assumptions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/StockBasedCompensationStockOptionPricingAssumptionsDetails</Role>
      <ShortName>Stock-Based Compensation - Stock Option Pricing Assumptions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>2466438 - Disclosure - Stock-Based Compensation - Restricted Stock Summary (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/StockBasedCompensationRestrictedStockSummaryDetails</Role>
      <ShortName>Stock-Based Compensation - Restricted Stock Summary (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>82</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>2467439 - Disclosure - Stock-Based Compensation - Restricted Stock Vesting Schedule (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/StockBasedCompensationRestrictedStockVestingScheduleDetails</Role>
      <ShortName>Stock-Based Compensation - Restricted Stock Vesting Schedule (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>2470440 - Disclosure - Parent Company Financial Information - Balance Sheets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/ParentCompanyFinancialInformationBalanceSheetsDetails</Role>
      <ShortName>Parent Company Financial Information - Balance Sheets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>2471441 - Disclosure - Parent Company Financial Information - Statements of Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/ParentCompanyFinancialInformationStatementsofIncomeDetails</Role>
      <ShortName>Parent Company Financial Information - Statements of Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>2472442 - Disclosure - Parent Company Financial Information - Statements of Cash Flows (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/ParentCompanyFinancialInformationStatementsofCashFlowsDetails</Role>
      <ShortName>Parent Company Financial Information - Statements of Cash Flows (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>86</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>2475443 - Disclosure - Fair Value - Financial Instruments Measured at FV on Recurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/FairValueFinancialInstrumentsMeasuredatFVonRecurringBasisDetails</Role>
      <ShortName>Fair Value - Financial Instruments Measured at FV on Recurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>87</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>2476444 - Disclosure - Fair Value - Loans Held For Sale (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/FairValueLoansHeldForSaleDetails</Role>
      <ShortName>Fair Value - Loans Held For Sale (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>88</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>2477445 - Disclosure - Fair Value - Impaired Loans and Foreclosed Real Estate (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/FairValueImpairedLoansandForeclosedRealEstateDetails</Role>
      <ShortName>Fair Value - Impaired Loans and Foreclosed Real Estate (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>89</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>2478446 - Disclosure - Fair Value - Financial Instruments Carrying Amount, FV and Placement (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/FairValueFinancialInstrumentsCarryingAmountFVandPlacementDetails</Role>
      <ShortName>Fair Value - Financial Instruments Carrying Amount, FV and Placement (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>90</Position>
    </Report>
    <Report instance="cbnk-20211231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>2481447 - Disclosure - Segments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://capitalbankmd.com/role/SegmentsDetails</Role>
      <ShortName>Segments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://capitalbankmd.com/role/SegmentsTables</ParentRole>
      <Position>91</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-K" original="cbnk-20211231.htm">cbnk-20211231.htm</File>
    <File>a2017stockandincentiveplan.htm</File>
    <File>cbnk-20211231.xsd</File>
    <File>cbnk-20211231_cal.xml</File>
    <File>cbnk-20211231_def.xml</File>
    <File>cbnk-20211231_lab.xml</File>
    <File>cbnk-20211231_pre.xml</File>
    <File>consentofindependentregist.htm</File>
    <File>ex311certofceo10k2021.htm</File>
    <File>ex312certofcfo10k2021.htm</File>
    <File>ex32certofsox10k2021.htm</File>
    <File>formofrsuawardagreement.htm</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="1">http://fasb.org/srt/2021-01-31</BaseTaxonomy>
    <BaseTaxonomy items="1702">http://fasb.org/us-gaap/2021-01-31</BaseTaxonomy>
    <BaseTaxonomy items="40">http://xbrl.sec.gov/dei/2021q4</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>