v3.19.3.a.u2

Stock-Based Compensation - Employee Stock Purchase Plan (Details) - USD ($) |  | 12 Months Ended
--- | --- | ---
Jun. 05, 2017 | Dec. 31, 2019 | Dec. 31, 2018
Employee Stock Purchase Plan |  |  |
Percentage of purchase price to fair market value | 85.00% |  |
Maximum payroll deduction amount per calendar year | $ 25,000 |  |
Issuance of common stock in connection with employee stock purchase plan |  | $ 3,382,000 | $ 3,121,000
Available for future issuance under 2017 Employee Stock Purchase Plan (in shares) |  | 812,964 |
Minimum |  |  |
Employee Stock Purchase Plan |  |  |
Percentage of payroll deduction | 1.00% |  |
Maximum |  |  |
Employee Stock Purchase Plan |  |  |
Percentage of payroll deduction | 15.00% |  |
Maximum shares of common stock issued under ESPP (in shares) | 1,000,000 |  |
Common Stock |  |  |
Employee Stock Purchase Plan |  |  |
Maximum shares of common stock issued under ESPP (in shares) |  | 123,365 | 63,671
Employee Stock |  |  |
Employee Stock Purchase Plan |  |  |
Issuance of common stock in connection with employee stock purchase plan |  | $ 3,400,000 |

X
- Definition Number of common shares reserved for future issuance pertaining to available for future issuance under employee stock purchase plan. + References No definition available. + Details
Name: | twou_CommonStockCapitalSharesReservedForFutureIssuanceAvailableForFutureIssuanceUnderStockPurchasePlan
Namespace Prefix: | twou_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | instant

X
- Definition The percentage of employee gross pay the employee may contribute to a defined contribution plan. + References No definition available. + Details
Name: | twou_DefinedContributionPlanAnnualContributionsPerEmployeePercent
Namespace Prefix: | twou_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | duration

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

X
- Definition Represents the least amount of percentage difference from purchase price to fair value. + References No definition available. + Details
Name: | twou_PercentagePurchasePriceFairMarketValue
Namespace Prefix: | twou_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Maximum amount the employee may contribute to a defined contribution plan. + References No definition available. + Details
Name: | us-gaap_DefinedContributionPlanMaximumAnnualContributionsPerEmployeeAmount
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Number of shares issued during the period as a result of an employee stock purchase plan. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 505 -SubTopic 10 -Section 50 -Paragraph 2 -URI http://asc.fasb.org/extlink&oid=109259400&loc=d3e21463-112644 Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 505 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.3-04) -URI http://asc.fasb.org/extlink&oid=27012166&loc=d3e187085-122770 Reference 3: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02(28)) -URI http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682 Reference 4: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02(29)) -URI http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682 + Details
Name: | us-gaap_StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | duration

X
- Definition Aggregate change in value for stock issued during the period as a result of employee stock purchase plan. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 505 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.3-04) -URI http://asc.fasb.org/extlink&oid=27012166&loc=d3e187085-122770 Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02(28)) -URI http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682 Reference 3: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02(29)) -URI http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682 Reference 4: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 505 -SubTopic 10 -Section 50 -Paragraph 2 -URI http://asc.fasb.org/extlink&oid=109259400&loc=d3e21463-112644 + Details
Name: | us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Details
Name: | srt_RangeAxis=srt_MinimumMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | srt_RangeAxis=srt_MaximumMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_StatementEquityComponentsAxis=us-gaap_CommonStockMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_AwardTypeAxis=us-gaap_EmployeeStockMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |