v3.8.0.1

Debt (Details) |  |  | 12 Months Ended |  |  |  |  |
--- | --- | --- | --- | --- | --- | --- | --- | ---
Jun. 27, 2017 USD ($) employee | Jun. 22, 2017 USD ($) employee | Dec. 31, 2017 USD ($) | Mar. 31, 2018 USD ($) | Jun. 30, 2017 USD ($) item | Dec. 31, 2016 USD ($) | Dec. 31, 2015 USD ($) | Dec. 31, 2013 USD ($)
Lines of Credit |  |  |  |  |  |  |  |
Aggregate borrowing base |  |  |  |  |  |  | $ 25,000,000 | $ 37,000,000
Amount outstanding |  |  | $ 0 |  |  | $ 0 |  |
Adjusted quick ratio |  |  | 5.44 |  |  | 5.43 |  |
Security deposit |  |  | $ 11,500,000 |  |  |  |  |
Government Grants |  |  |  |  |  |  |  |
Amount of loan |  |  | 3,500,000 |  | $ 3,500,000 |  |  |
Number of government grants | item |  |  |  |  | 2 |  |  |
Prince George's County, Maryland |  |  |  |  |  |  |  |
Government Grants |  |  |  |  |  |  |  |
Amount of loan |  | $ 1,500,000 |  |  |  |  |  |
Loan interest rate (in percentage) |  | 3.00% |  |  |  |  |  |
Minimum number of employees required to avoid default of loan for payment principal and accrued interest | employee |  | 650 |  |  |  |  |  |
Minimum number of employees required to avoid default of loan for payment prorated portion and interest | employee |  | 1,300 |  |  |  |  |  |
Amount of prorated portion of loan per employee |  | $ 2,252 |  |  |  |  |  |
Standby letters of credit |  |  |  |  |  |  |  |
Lines of Credit |  |  |  |  |  |  |  |
Aggregate borrowing base |  |  |  |  | $ 10,000,000 |  |  |
Short Course Segment |  |  |  |  |  |  |  |
Lines of Credit |  |  |  |  |  |  |  |
Amount outstanding |  |  | $ 0 |  |  |  |  |
Interest rate (in percentage) |  |  | 10.25% |  |  |  |  |
Short Course Segment | Revolving working capital facility |  |  |  |  |  |  |  |
Lines of Credit |  |  |  |  |  |  |  |
Aggregate borrowing base |  |  | $ 1,900,000 |  |  |  |  |
Short Course Segment | Revolving working capital facility | Subsequent Event |  |  |  |  |  |  |  |
Lines of Credit |  |  |  |  |  |  |  |
Aggregate borrowing base |  |  |  | $ 1,300,000 |  |  |  |
Harkins Road LLC | Department of Commerce |  |  |  |  |  |  |  |
Government Grants |  |  |  |  |  |  |  |
Amount of loan | $ 2,000,000 |  |  |  |  |  |  |
Loan interest rate (in percentage) | 3.00% |  |  |  |  |  |  |
Minimum number of employees required to avoid default of loan for payment principal and accrued interest | employee | 650 |  |  |  |  |  |  |
Minimum number of employees required to avoid default of loan for payment prorated portion and interest | employee | 1,600 |  |  |  |  |  |  |
Amount of prorated portion of loan per employee | $ 2,105 |  |  |  |  |  |  |
Base rate |  |  |  |  |  |  |  |
Lines of Credit |  |  |  |  |  |  |  |
Variable interest rate basis |  |  | Base rate |  |  |  |  |
Applicable margin (as a percent) |  |  | 1.50% |  |  |  |  |
Federal fund rate |  |  |  |  |  |  |  |
Lines of Credit |  |  |  |  |  |  |  |
Variable interest rate basis |  |  | Federal fund rate |  |  |  |  |
Applicable margin (as a percent) |  |  | 1.00% |  |  |  |  |
30 days LIBOR |  |  |  |  |  |  |  |
Lines of Credit |  |  |  |  |  |  |  |
Variable interest rate basis |  |  | 30-day LIBOR |  |  |  |  |
Applicable margin (as a percent) |  |  | 1.00% |  |  |  |  |
LIBOR |  |  |  |  |  |  |  |
Lines of Credit |  |  |  |  |  |  |  |
Variable interest rate basis |  |  | LIBOR |  |  |  |  |
Applicable margin (as a percent) |  |  | 2.50% |  |  |  |  |
Minimum |  |  |  |  |  |  |  |
Lines of Credit |  |  |  |  |  |  |  |
Covenants ratio |  |  | 1.10 |  |  |  |  |

X
- Definition Represents the Company's adjusted quick ratio + References No definition available. + Details
Name: | twou_AdjustedQuickRatio
Namespace Prefix: | twou_
Data Type: | xbrli:pureItemType
Balance Type: | na
Period Type: | instant

X
- Definition Ratio applied to covenants under the line of credit to incur additional indebtedness. + References No definition available. + Details
Name: | twou_CovenantsRatio
Namespace Prefix: | twou_
Data Type: | xbrli:pureItemType
Balance Type: | na
Period Type: | instant

X
- Definition Amount of deferred government grant obligations due beyond one year or the operating cycle, whichever is longer. + References No definition available. + Details
Name: | twou_DeferredGovernmentGrantObligationsNoncurrent
Namespace Prefix: | twou_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition N/A. + References No definition available. + Details
Name: | twou_GovernmentGrantsAbstract
Namespace Prefix: | twou_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition The minimum number of employees to employ at any time during the term of the loan or otherwise defaults on the loan, the entire principal balance, plus accrued interest, will become due and payable. + References No definition available. + Details
Name: | twou_NumberOfEmployeesToEmployDuringTermOfLoanToAvoidRepaymentOfPrincipalBalanceAndAccruedInterestOfLoan
Namespace Prefix: | twou_
Data Type: | xbrli:integerItemType
Balance Type: | na
Period Type: | duration

X
- Definition The minimum number of employees to employ at any time during the term of the loan or otherwise defaults on the loan, the company will be required to repay a prorated portion of the loan plus interest. + References No definition available. + Details
Name: | twou_NumberOfEmployeesToEmployDuringTermOfLoanToAvoidRepaymentOfProratedPortionOfLoanAndInterest
Namespace Prefix: | twou_
Data Type: | xbrli:integerItemType
Balance Type: | na
Period Type: | duration

X
- Definition Represents the number of government grants. + References No definition available. + Details
Name: | twou_NumberOfGovernmentGrants
Namespace Prefix: | twou_
Data Type: | xbrli:integerItemType
Balance Type: | na
Period Type: | instant

X
- Definition Amount represents the prorated portion of the loan amount per employee. + References No definition available. + Details
Name: | twou_ProratedPortionOfLoanEmployee
Namespace Prefix: | twou_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Percentage points added to the reference rate to compute the variable rate on the debt instrument. + References No definition available. + Details
Name: | us-gaap_DebtInstrumentBasisSpreadOnVariableRate1
Namespace Prefix: | us-gaap_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition The reference rate for the variable rate of the debt instrument, such as LIBOR or the US Treasury rate and the maturity of the reference rate used, such as three months or six months LIBOR. + References No definition available. + Details
Name: | us-gaap_DebtInstrumentDescriptionOfVariableRateBasis
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Contractual interest rate for funds borrowed, under the debt agreement. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02.22(a)(1)) -URI http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682 + Details
Name: | us-gaap_DebtInstrumentInterestRateStatedPercentage
Namespace Prefix: | us-gaap_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | instant

X
- Definition The carrying value as of the balance sheet date of the current and noncurrent portions of long-term obligations drawn from a line of credit, which is a bank's commitment to make loans up to a specific amount. Examples of items that might be included in the application of this element may consist of letters of credit, standby letters of credit, and revolving credit arrangements, under which borrowings can be made up to a maximum amount as of any point in time conditional on satisfaction of specified terms before, as of and after the date of drawdowns on the line. Includes short-term obligations that would normally be classified as current liabilities but for which (a) postbalance sheet date issuance of a long term obligation to refinance the short term obligation on a long term basis, or (b) the enterprise has entered into a financing agreement that clearly permits the enterprise to refinance the short-term obligation on a long term basis and the following conditions are met (1) the agreement does not expire within 1 year and is not cancelable by the lender except for violation of an objectively determinable provision, (2) no violation exists at the BS date, and (3) the lender has entered into the financing agreement is expected to be financially capable of honoring the agreement. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02(22)) -URI http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682 Reference 2: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 944 -SubTopic 210 -Section S99 -Paragraph 1 -Subparagraph (SX 210.7-03(16)) -URI http://asc.fasb.org/extlink&oid=6879938&loc=d3e572229-122910 Reference 3: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 942 -SubTopic 210 -Section S99 -Paragraph 1 -Subparagraph (SX 210.9-03(16)) -URI http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878 + Details
Name: | us-gaap_LineOfCredit
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- References No definition available. + Details
Name: | us-gaap_LineOfCreditFacilityAbstract
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition The effective interest rate during the reporting period. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02.19(b),22(b)) -URI http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682 + Details
Name: | us-gaap_LineOfCreditFacilityInterestRateDuringPeriod
Namespace Prefix: | us-gaap_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Maximum borrowing capacity under the credit facility without consideration of any current restrictions on the amount that could be borrowed or the amounts currently outstanding under the facility. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02.19(b),22(b)) -URI http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682 + Details
Name: | us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition The amount of an asset, typically cash, provided to a counterparty to provide certain assurance of performance by the entity pursuant to the terms of a written or oral agreement, such as a lease. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02.8,17) -URI http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682 + Details
Name: | us-gaap_SecurityDeposit
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Details
Name: | us-gaap_LineOfCreditFacilityAxis=twou_PrinceGeorgesCountyMarylandMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_CreditFacilityAxis=us-gaap_StandbyLettersOfCreditMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_StatementBusinessSegmentsAxis=twou_ShortCourseSegmentMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_CreditFacilityAxis=twou_RevolvingWorkingCapitalFacilityMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_SubsequentEventTypeAxis=us-gaap_SubsequentEventMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | dei_LegalEntityAxis=twou_HarkinsRoadLlcMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_LineOfCreditFacilityAxis=twou_DepartmentOfCommerceMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VariableRateAxis=us-gaap_BaseRateMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VariableRateAxis=twou_FederalFundRateMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VariableRateAxis=twou_ThirtyDaysLiborMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VariableRateAxis=us-gaap_LondonInterbankOfferedRateLIBORMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_RangeAxis=us-gaap_MinimumMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |