<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.21.4</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>332</ContextCount>
  <ElementCount>516</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>102</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>14</UnitCount>
  <MyReports>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>00090 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>00100 - Statement - UNAUDITED CONDENSED CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/StatementUnauditedCondensedConsolidatedBalanceSheets</Role>
      <ShortName>UNAUDITED CONDENSED CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>00105 - Statement - UNAUDITED CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/StatementUnauditedCondensedConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>UNAUDITED CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>00200 - Statement - UNAUDITED CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/StatementUnauditedCondensedConsolidatedStatementsOfOperations</Role>
      <ShortName>UNAUDITED CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>00300 - Statement - UNAUDITED CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/StatementUnauditedCondensedConsolidatedStatementsOfComprehensiveIncome</Role>
      <ShortName>UNAUDITED CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>00400 - Statement - UNAUDITED CONDENSED CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/StatementUnauditedCondensedConsolidatedStatementsOfStockholdersEquity</Role>
      <ShortName>UNAUDITED CONDENSED CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>00500 - Statement - UNAUDITED CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/StatementUnauditedCondensedConsolidatedStatementsOfCashFlows</Role>
      <ShortName>UNAUDITED CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>00505 - Statement - UNAUDITED CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/StatementUnauditedCondensedConsolidatedStatementsOfCashFlowsParenthetical</Role>
      <ShortName>UNAUDITED CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>10101 - Disclosure - Description of the Business</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureDescriptionOfBusiness</Role>
      <ShortName>Description of the Business</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>10201 - Disclosure - Basis of Presentation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureBasisOfPresentation</Role>
      <ShortName>Basis of Presentation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>10301 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>10401 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureIncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>10501 - Disclosure - Finance and Operating Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureFinanceAndOperatingLeases</Role>
      <ShortName>Finance and Operating Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>10601 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureDebt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>10701 - Disclosure - Credit Facility</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureCreditFacility</Role>
      <ShortName>Credit Facility</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>10801 - Disclosure - Equity Incentive Plan</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureEquityIncentivePlan</Role>
      <ShortName>Equity Incentive Plan</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>10901 - Disclosure - Related Party Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureRelatedPartyTransactions</Role>
      <ShortName>Related Party Transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>11001 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureCommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>11101 - Disclosure - Acquisitions and Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureAcquisitionsAndInvestments</Role>
      <ShortName>Acquisitions and Investments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>11201 - Disclosure - Supplemental Disclosure of Cash Flow Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSupplementalDisclosureOfCashFlowInformation</Role>
      <ShortName>Supplemental Disclosure of Cash Flow Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>20302 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>30303 - Disclosure - Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>30503 - Disclosure - Finance and Operating Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureFinanceAndOperatingLeasesTables</Role>
      <ShortName>Finance and Operating Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureFinanceAndOperatingLeases</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>30603 - Disclosure - Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureDebtTables</Role>
      <ShortName>Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureDebt</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>30803 - Disclosure - Equity Incentive Plan (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureEquityIncentivePlanTables</Role>
      <ShortName>Equity Incentive Plan (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureEquityIncentivePlan</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>31103 - Disclosure - Acquisitions and Investments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureAcquisitionsAndInvestmentsTables</Role>
      <ShortName>Acquisitions and Investments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureAcquisitionsAndInvestments</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>31203 - Disclosure - Supplemental Disclosure of Cash Flow Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSupplementalDisclosureOfCashFlowInformationTables</Role>
      <ShortName>Supplemental Disclosure of Cash Flow Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureSupplementalDisclosureOfCashFlowInformation</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>40101 - Disclosure - Description of the Business (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureDescriptionOfBusinessDetails</Role>
      <ShortName>Description of the Business (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureDescriptionOfBusiness</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>40201 - Disclosure - Basis of Presentation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureBasisOfPresentationDetails</Role>
      <ShortName>Basis of Presentation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureBasisOfPresentation</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>40301 - Disclosure - Summary of Significant Accounting Policies - ASU (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesAsuDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - ASU (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesTables</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>40302 - Disclosure - Summary of Significant Accounting Policies - Revenue Recognition (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesRevenueRecognitionDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Revenue Recognition (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>40303 - Disclosure - Summary of Significant Accounting Policies - Disaggregation of revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesDisaggregationOfRevenueDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Disaggregation of revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>40304 - Disclosure - Summary of Significant Accounting Policies - Concentration Risk and Inventories (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesConcentrationRiskAndInventoriesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Concentration Risk and Inventories (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>40305 - Disclosure - Summary of Significant Accounting Policies - Contract Balances (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesContractBalancesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Contract Balances (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>40306 - Disclosure - Summary of Significant Accounting Policies - Performance Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesPerformanceObligationsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Performance Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>40307 - Disclosure - Summary of Significant Accounting Policies - Marketable Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesMarketableSecuritiesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Marketable Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>40308 - Disclosure - Summary of Significant Accounting Policies - Inventories (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesInventoriesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Inventories (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>40309 - Disclosure - Summary of Significant Accounting Policies - Property and Equipment and Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesPropertyAndEquipmentAndLeasesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Property and Equipment and Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>40310 - Disclosure - Summary of Significant Accounting Policies - Goodwill and Intangibles (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesGoodwillAndIntangiblesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Goodwill and Intangibles (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>40311 - Disclosure - Summary of Significant Accounting Policies - Fair Value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesFairValueDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Fair Value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>40312 - Disclosure - Summary of Significant Accounting Policies - Fair Value Measurements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesFairValueMeasurementsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Fair Value Measurements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>40313 - Disclosure - Summary of Significant Accounting Policies - Net Income (Loss) Per Common Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSummaryOfSignificantAccountingPoliciesNetIncomeLossPerCommonShareDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Net Income (Loss) Per Common Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>40401 - Disclosure - Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureIncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureIncomeTaxes</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>40501 - Disclosure - Finance and Operating Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureFinanceAndOperatingLeasesDetails</Role>
      <ShortName>Finance and Operating Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureFinanceAndOperatingLeasesTables</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>40502 - Disclosure - Finance and Operating Leases - Finance leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureFinanceAndOperatingLeasesFinanceLeasesDetails</Role>
      <ShortName>Finance and Operating Leases - Finance leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>40503 - Disclosure - Finance and Operating Leases - Operating Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureFinanceAndOperatingLeasesOperatingLeasesDetails</Role>
      <ShortName>Finance and Operating Leases - Operating Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>40504 - Disclosure - Finance and Operating Leases - Sub Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureFinanceAndOperatingLeasesSubLeasesDetails</Role>
      <ShortName>Finance and Operating Leases - Sub Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>40505 - Disclosure - Finance and Operating Leases - Lease cost and other information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureFinanceAndOperatingLeasesLeaseCostAndOtherInformationDetails</Role>
      <ShortName>Finance and Operating Leases - Lease cost and other information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>40601 - Disclosure - Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureDebtDetails</Role>
      <ShortName>Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureDebtTables</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>40602 - Disclosure - Debt - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureDebtAdditionalInformationDetails</Role>
      <ShortName>Debt - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>40701 - Disclosure - Credit Facility (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureCreditFacilityDetails</Role>
      <ShortName>Credit Facility (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureCreditFacility</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>40801 - Disclosure - Equity Incentive Plan - Share Based Compensation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureEquityIncentivePlanShareBasedCompensationDetails</Role>
      <ShortName>Equity Incentive Plan - Share Based Compensation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>40802 - Disclosure - Equity Incentive Plan - Vesting (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureEquityIncentivePlanVestingDetails</Role>
      <ShortName>Equity Incentive Plan - Vesting (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>40803 - Disclosure - Equity Incentive Plan - Restricted Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureEquityIncentivePlanRestrictedStockDetails</Role>
      <ShortName>Equity Incentive Plan - Restricted Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>40804 - Disclosure - Equity Incentive Plan - Other (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureEquityIncentivePlanOtherDetails</Role>
      <ShortName>Equity Incentive Plan - Other (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>40901 - Disclosure - Related Party Transactions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureRelatedPartyTransactionsDetails</Role>
      <ShortName>Related Party Transactions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureRelatedPartyTransactions</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>41001 - Disclosure - Commitments and Contingencies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureCommitmentsAndContingenciesDetails</Role>
      <ShortName>Commitments and Contingencies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureCommitmentsAndContingencies</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>41101 - Disclosure - Acquisitions and Investments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureAcquisitionsAndInvestmentsDetails</Role>
      <ShortName>Acquisitions and Investments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureAcquisitionsAndInvestmentsTables</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="lrn-20211231x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>41201 - Disclosure - Supplemental Disclosure of Cash Flow Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.K12.com/role/DisclosureSupplementalDisclosureOfCashFlowInformationDetails</Role>
      <ShortName>Supplemental Disclosure of Cash Flow Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.K12.com/role/DisclosureSupplementalDisclosureOfCashFlowInformationTables</ParentRole>
      <Position>59</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" original="lrn-20211231x10q.htm">lrn-20211231x10q.htm</File>
    <File>lrn-20211231.xsd</File>
    <File>lrn-20211231_cal.xml</File>
    <File>lrn-20211231_def.xml</File>
    <File>lrn-20211231_lab.xml</File>
    <File>lrn-20211231_pre.xml</File>
    <File>lrn-20211231xex31d1.htm</File>
    <File>lrn-20211231xex31d2.htm</File>
    <File>lrn-20211231xex32d1.htm</File>
    <File>lrn-20211231xex32d2.htm</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2021q4</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/us-gaap/2021-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/srt/2021-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
