<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.26.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>167</ContextCount>
  <ElementCount>331</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>53</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>9</UnitCount>
  <MyReports>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>9952151 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETS</Role>
      <ShortName>CONDENSED CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>9952152 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETSParenthetical</Role>
      <ShortName>CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>9952153 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONS</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>9952154 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE (LOSS) INCOME</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCOMPREHENSIVELOSSINCOME</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE (LOSS) INCOME</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>9952155 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF STOCKHOLDERS’ EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITY</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF STOCKHOLDERS’ EQUITY</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>9952156 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>9952157 - Disclosure - Organization and Description of Business</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/OrganizationandDescriptionofBusiness</Role>
      <ShortName>Organization and Description of Business</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>9952158 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/SummaryofSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>9952159 - Disclosure - Revenue</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/Revenue</Role>
      <ShortName>Revenue</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>9952160 - Disclosure - (Loss) Earnings Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/LossEarningsPerShare</Role>
      <ShortName>(Loss) Earnings Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>9952161 - Disclosure - Marketable Investment Securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/MarketableInvestmentSecurities</Role>
      <ShortName>Marketable Investment Securities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>9952162 - Disclosure - Property and Equipment, Net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/PropertyandEquipmentNet</Role>
      <ShortName>Property and Equipment, Net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>9952163 - Disclosure - Goodwill and Other Intangible Assets, Net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/GoodwillandOtherIntangibleAssetsNet</Role>
      <ShortName>Goodwill and Other Intangible Assets, Net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>9952164 - Disclosure - Other Accrued and Current Liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/OtherAccruedandCurrentLiabilities</Role>
      <ShortName>Other Accrued and Current Liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>9952165 - Disclosure - Long-Term Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/LongTermDebt</Role>
      <ShortName>Long-Term Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>9952166 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/Leases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>9952167 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/FairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>9952168 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/CommitmentsandContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>9952169 - Disclosure - Stock Incentive Plans and Stock-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/StockIncentivePlansandStockBasedCompensation</Role>
      <ShortName>Stock Incentive Plans and Stock-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>9952170 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>9952171 - Disclosure - Segment and Related Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/SegmentandRelatedInformation</Role>
      <ShortName>Segment and Related Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>995445 - Disclosure - Insider Trading Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingArrangements</Role>
      <ShortName>Insider Trading Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9955511 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/SummaryofSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/SummaryofSignificantAccountingPolicies</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9955512 - Disclosure - Revenue (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/RevenueTables</Role>
      <ShortName>Revenue (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/Revenue</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9955513 - Disclosure - (Loss) Earnings Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/LossEarningsPerShareTables</Role>
      <ShortName>(Loss) Earnings Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/LossEarningsPerShare</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9955514 - Disclosure - Marketable Investment Securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/MarketableInvestmentSecuritiesTables</Role>
      <ShortName>Marketable Investment Securities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/MarketableInvestmentSecurities</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9955515 - Disclosure - Property and Equipment, Net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/PropertyandEquipmentNetTables</Role>
      <ShortName>Property and Equipment, Net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/PropertyandEquipmentNet</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9955516 - Disclosure - Goodwill and Other Intangible Assets, Net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/GoodwillandOtherIntangibleAssetsNetTables</Role>
      <ShortName>Goodwill and Other Intangible Assets, Net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/GoodwillandOtherIntangibleAssetsNet</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9955517 - Disclosure - Other Accrued and Current Liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/OtherAccruedandCurrentLiabilitiesTables</Role>
      <ShortName>Other Accrued and Current Liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/OtherAccruedandCurrentLiabilities</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9955518 - Disclosure - Long-Term Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/LongTermDebtTables</Role>
      <ShortName>Long-Term Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/LongTermDebt</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9955519 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/FairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/FairValueMeasurements</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9955520 - Disclosure - Stock Incentive Plans and Stock-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/StockIncentivePlansandStockBasedCompensationTables</Role>
      <ShortName>Stock Incentive Plans and Stock-Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/StockIncentivePlansandStockBasedCompensation</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9955521 - Disclosure - Segment and Related Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/SegmentandRelatedInformationTables</Role>
      <ShortName>Segment and Related Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/SegmentandRelatedInformation</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9955522 - Disclosure - Summary of Significant Accounting Policies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/SummaryofSignificantAccountingPoliciesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/SummaryofSignificantAccountingPoliciesPolicies</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9955523 - Disclosure - Revenue - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/RevenueNarrativeDetails</Role>
      <ShortName>Revenue - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9955524 - Disclosure - Revenue - Schedule of Disaggregation of Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/RevenueScheduleofDisaggregationofRevenueDetails</Role>
      <ShortName>Revenue - Schedule of Disaggregation of Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9955525 - Disclosure - Revenue - Schedule of Concentration of Risk, by Risk Factor (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/RevenueScheduleofConcentrationofRiskbyRiskFactorDetails</Role>
      <ShortName>Revenue - Schedule of Concentration of Risk, by Risk Factor (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9955526 - Disclosure - (Loss) Earnings Per Share - Schedule of Computation of Basic and Diluted Earnings (Loss) Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/LossEarningsPerShareScheduleofComputationofBasicandDilutedEarningsLossPerShareDetails</Role>
      <ShortName>(Loss) Earnings Per Share - Schedule of Computation of Basic and Diluted Earnings (Loss) Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9955527 - Disclosure - (Loss) Earnings Per Share - Schedule of Antidilutive Securities Excluded from Computation of Earnings (Loss) Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/LossEarningsPerShareScheduleofAntidilutiveSecuritiesExcludedfromComputationofEarningsLossPerShareDetails</Role>
      <ShortName>(Loss) Earnings Per Share - Schedule of Antidilutive Securities Excluded from Computation of Earnings (Loss) Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9955528 - Disclosure - Marketable Investment Securities - Schedule of Marketable Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/MarketableInvestmentSecuritiesScheduleofMarketableSecuritiesDetails</Role>
      <ShortName>Marketable Investment Securities - Schedule of Marketable Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9955529 - Disclosure - Marketable Investment Securities - Schedule of Unrealized Gains and Losses on Equity Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/MarketableInvestmentSecuritiesScheduleofUnrealizedGainsandLossesonEquitySecuritiesDetails</Role>
      <ShortName>Marketable Investment Securities - Schedule of Unrealized Gains and Losses on Equity Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9955530 - Disclosure - Marketable Investment Securities - Schedule of Debt Securities, Available-for-Sale and Held-to-Maturity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/MarketableInvestmentSecuritiesScheduleofDebtSecuritiesAvailableforSaleandHeldtoMaturityDetails</Role>
      <ShortName>Marketable Investment Securities - Schedule of Debt Securities, Available-for-Sale and Held-to-Maturity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9955531 - Disclosure - Marketable Investment Securities - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/MarketableInvestmentSecuritiesNarrativeDetails</Role>
      <ShortName>Marketable Investment Securities - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9955532 - Disclosure - Property and Equipment, Net - Schedule of Property and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/PropertyandEquipmentNetScheduleofPropertyandEquipmentDetails</Role>
      <ShortName>Property and Equipment, Net - Schedule of Property and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9955533 - Disclosure - Property and Equipment, Net - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/PropertyandEquipmentNetNarrativeDetails</Role>
      <ShortName>Property and Equipment, Net - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9955534 - Disclosure - Property and Equipment, Net - Schedule of Depreciation Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/PropertyandEquipmentNetScheduleofDepreciationExpenseDetails</Role>
      <ShortName>Property and Equipment, Net - Schedule of Depreciation Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9955535 - Disclosure - Goodwill and Other Intangible Assets, Net - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/GoodwillandOtherIntangibleAssetsNetNarrativeDetails</Role>
      <ShortName>Goodwill and Other Intangible Assets, Net - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9955536 - Disclosure - Goodwill and Other Intangible Assets, Net - Schedule of Other Intangible Assets, Net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/GoodwillandOtherIntangibleAssetsNetScheduleofOtherIntangibleAssetsNetDetails</Role>
      <ShortName>Goodwill and Other Intangible Assets, Net - Schedule of Other Intangible Assets, Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9955537 - Disclosure - Other Accrued and Current Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/OtherAccruedandCurrentLiabilitiesDetails</Role>
      <ShortName>Other Accrued and Current Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/OtherAccruedandCurrentLiabilitiesTables</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9955538 - Disclosure - Long-Term Debt - Schedule of Long-term Debt Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/LongTermDebtScheduleofLongtermDebtInstrumentsDetails</Role>
      <ShortName>Long-Term Debt - Schedule of Long-term Debt Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9955539 - Disclosure - Long-Term Debt - Schedule of Maturities of Long-Term Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/LongTermDebtScheduleofMaturitiesofLongTermDebtDetails</Role>
      <ShortName>Long-Term Debt - Schedule of Maturities of Long-Term Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>9955540 - Disclosure - Long-Term Debt - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/LongTermDebtNarrativeDetails</Role>
      <ShortName>Long-Term Debt - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>9955541 - Disclosure - Long-Term Debt - Schedule of Components of Interest Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/LongTermDebtScheduleofComponentsofInterestExpenseDetails</Role>
      <ShortName>Long-Term Debt - Schedule of Components of Interest Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>9955542 - Disclosure - Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/LeasesDetails</Role>
      <ShortName>Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/Leases</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>9955543 - Disclosure - Fair Value Measurements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/FairValueMeasurementsDetails</Role>
      <ShortName>Fair Value Measurements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/FairValueMeasurementsTables</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>9955544 - Disclosure - Stock Incentive Plans and Stock-Based Compensation - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/StockIncentivePlansandStockBasedCompensationNarrativeDetails</Role>
      <ShortName>Stock Incentive Plans and Stock-Based Compensation - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/StockIncentivePlansandStockBasedCompensationTables</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>9955545 - Disclosure - Stock Incentive Plans and Stock-Based Compensation - Schedule of Activity Under Stock Incentive Plan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/StockIncentivePlansandStockBasedCompensationScheduleofActivityUnderStockIncentivePlanDetails</Role>
      <ShortName>Stock Incentive Plans and Stock-Based Compensation - Schedule of Activity Under Stock Incentive Plan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>9955546 - Disclosure - Stock Incentive Plans and Stock Based Compensation - Schedule of Restricted Stock Units and Performance Stock Units (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/StockIncentivePlansandStockBasedCompensationScheduleofRestrictedStockUnitsandPerformanceStockUnitsDetails</Role>
      <ShortName>Stock Incentive Plans and Stock Based Compensation - Schedule of Restricted Stock Units and Performance Stock Units (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>9955547 - Disclosure - Stock Incentive Plans and Stock-Based Compensation - Schedule of Assumptions Used in Fair Value of Stock Options and ESPP (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/StockIncentivePlansandStockBasedCompensationScheduleofAssumptionsUsedinFairValueofStockOptionsandESPPDetails</Role>
      <ShortName>Stock Incentive Plans and Stock-Based Compensation - Schedule of Assumptions Used in Fair Value of Stock Options and ESPP (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>9955548 - Disclosure - Stock Incentive Plans and Stock-Based Compensation - Schedule of Stock-based Compensation Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/StockIncentivePlansandStockBasedCompensationScheduleofStockbasedCompensationExpenseDetails</Role>
      <ShortName>Stock Incentive Plans and Stock-Based Compensation - Schedule of Stock-based Compensation Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>9955549 - Disclosure - Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/IncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.castlebiosciences.com/role/IncomeTaxes</ParentRole>
      <Position>62</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>9955550 - Disclosure - Segment and Related Information - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/SegmentandRelatedInformationNarrativeDetails</Role>
      <ShortName>Segment and Related Information - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>9955551 - Disclosure - Segment and Related Information - Schedule of Measures of Segment Profit (Loss) Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/SegmentandRelatedInformationScheduleofMeasuresofSegmentProfitLossIncomeDetails</Role>
      <ShortName>Segment and Related Information - Schedule of Measures of Segment Profit (Loss) Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="cstl-20260630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>9955552 - Disclosure - Segment and Related Information - Schedule of Other Amounts Included in the Measure of Segment Profit (Loss) Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.castlebiosciences.com/role/SegmentandRelatedInformationScheduleofOtherAmountsIncludedintheMeasureofSegmentProfitLossIncomeDetails</Role>
      <ShortName>Segment and Related Information - Schedule of Other Amounts Included in the Measure of Segment Profit (Loss) Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</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-Q" isDefinitelyFs="true" isUsgaap="true" original="cstl-20260630.htm">cstl-20260630.htm</File>
    <File>cstl-20260630.xsd</File>
    <File>cstl-20260630_cal.xml</File>
    <File>cstl-20260630_def.xml</File>
    <File>cstl-20260630_lab.xml</File>
    <File>cstl-20260630_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="771">http://fasb.org/us-gaap/2026</BaseTaxonomy>
    <BaseTaxonomy items="30">http://xbrl.sec.gov/dei/2026</BaseTaxonomy>
    <BaseTaxonomy items="21">http://xbrl.sec.gov/ecd/2026</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
