Description of Business and Summary of Significant Accounting Policies | Description of Business and Summary of Significant Accounting Policies Description of Business —Redfin Corporation was incorporated in October 2002 and is headquartered in Seattle, Washington. We operate an online real estate marketplace and provide real estate services, including assisting individuals in the purchase or sale of their home. We also provides title and settlement services, originate and sell mortgages, and buy and sell homes. We have operations located in multiple states across the United States and certain provinces in Canada. Initial Public Offering —On August 2, 2017, we completed our IPO whereby 10,615,650 shares of common stock were sold at a price of $15.00 per share, which included 1,384,650 shares pursuant to the underwriters' option to purchase additional shares. We received net proceeds of $144,380 after deducting the underwriting discount and offering expenses directly attributable to the IPO. Upon the closing of the IPO, all shares of the outstanding redeemable convertible preferred stock automatically converted into 55,422,002 shares of common stock on a one -for-one basis. Basis of Presentation —The consolidated financial statements and accompanying notes have been prepared in accordance with generally accepted accounting principles in the United States of America (“GAAP”). Principles of Consolidation —The consolidated financial statements include the accounts of Redfin and its wholly owned subsidiaries, including those entities in which we have a variable interest and of which we are the primary beneficiary. Intercompany transactions and balances have been eliminated. Certain Significant Risks and Business Uncertainties — We are subject to the risks and challenges associated with companies at a similar stage of development. These include dependence on key individuals, successful development and marketing of our offerings, and competition with larger companies with greater financial, technical, and marketing resources. Further, to achieve substantially higher revenue in order to become profitable, we may require additional funds that may not be available or may not be on terms that are acceptable to us. We operate in the online real estate marketplace and, accordingly, can be affected by a variety of factors. For example, our management believes that any of the following factors could have a significant negative effect on our future financial position, results of operations, and cash flows: negative macroeconomic factors affecting the health of the U.S. residential real estate industry, negative factors disproportionately affecting markets where the we derive most of our revenue, intense competition in the U.S. residential real estate industry, our inability to maintain or improve our technology offerings, our failure to obtain and provide comprehensive and accurate real estate listings, errors or inaccuracies in the business data that we rely on to make decisions, and our inability to attract homebuyers and home sellers to our website and mobile application. Use of Estimates — The preparation of consolidated financial statements, in conformity with GAAP, requires our management to make estimates and assumptions that affect the reported amounts of assets and liabilities and results of operations during the respective periods. Our estimates include, but are not limited to, valuation of deferred income taxes, stock-based compensation, net realizable value of inventory, capitalization of website and software development costs, the incremental borrowing rate for the determination of the present value of lease payments, recoverability of intangible assets with finite lives, fair value of our mortgage loans held for sale, fair value of reporting units for purposes of evaluating goodwill for impairment, and the fair value of the convertible feature related to our convertible senior notes (see Note 14). The amounts ultimately realized from the affected assets or ultimately recognized as liabilities will depend on, among other factors, general business conditions and could differ materially in the near term from the carrying amounts reflected in the consolidated financial statements. Cash and Cash Equivalents —We consider all highly liquid investments originally purchased by us with original maturities of three months or less at the date of purchase to be cash equivalents and classified as available-for-sale. Our cash equivalents consist primarily of money market instruments. We maintain cash and cash equivalent balances with financial institutions that exceed federally-insured limits. Restricted Cash and Other Payables —Restricted cash primarily consists of cash held in escrow on behalf of real estate buyers using our title and settlement services. Since we do not have rights to the cash, a corresponding customer deposit liability in the same amount is recognized in the consolidated balance sheets in other payables. When a real estate services transaction closes, the restricted cash transfers from escrow and the corresponding deposit liability is reduced. In addition, we have other restricted cash that is specifically designated to repay borrowings under warehouse credit facilities and the secured revolving credit facility. Investments —We have two types of investments: (i) available-for-sale investments that are available to support our operational needs and which are reported on the balance sheet as short-term and long-term investments and (ii) long-term equity investments accounted for under the cost method, which are reported in other non-current assets. Available-for-sale Our short-term and long-term investments consist primarily of U.S. treasury securities, all of which are classified as available-for-sale. Available-for-sale debt securities are recorded at fair value, and unrealized holding gains and losses are recorded as a component of accumulated other comprehensive income. Available-for-sale securities with maturities of one year or less and those identified by management at the time of purchase to be used to fund operations within one year are classified as short-term. All other available-for-sale securities are classified as long-term. We evaluate our available-for-sale securities, both ones classified as cash equivalents and as investments, for other-than-temporary impairment on a quarterly basis. Unrealized losses are charged against net earnings when a decline in fair value is determined to be other than temporary. We review factors to determine whether a loss is other than temporary, such as the length and extent of the fair value decline, the financial condition and near-term prospects of the issuer, and whether we have the intent to sell or will more likely than not be required to sell before the securities' anticipated recovery, which may be at maturity. Realized gains and losses are accounted for using the specific identification method. Purchases and sales are recorded on a trade date basis. Cost Method Investments Our long-term equity investment consist of a purchased equity interest in a privately held company for approximately $2,000 . The investment is an equity security without a readily determinable fair value and is accounted for at cost minus any impairment, plus or minus changes resulting from observable price changes in orderly transactions for identical or similar investments of the same issuer. We perform a qualitative assessment to consider impairment indicators and evaluate whether the investment is impaired as of the end of each reporting period. Fair Value — We account for certain assets and liabilities at fair value. Fair value is defined as the exchange price that would be received for an asset or an exit price paid to transfer a liability in the principal or most advantageous market for the asset or liability in an orderly transaction between market participants on the measurement date. Valuation techniques used to measure fair value must maximize the use of observable inputs and minimize the use of unobservable inputs. The current accounting guidance for fair value measurements defines a three-level valuation hierarchy for disclosures as follows: Level 1 —Unadjusted quoted prices in active markets for identical assets or liabilities. Level 2 —Inputs other than quoted prices included within Level 1 that are observable, unadjusted quoted prices in markets that are not active, or other inputs that are observable such as quoted prices for similar assets or liabilities in active markets, or can be corroborated by observable market data. Level 3 —Unobservable inputs that are supported by little or no market activity and require us to develop our own assumptions. The categorization of a financial instrument within the valuation hierarchy is based upon the lowest level of input that is significant to the fair value measurement. Our financial instruments consist of Level 1, Level 2, and Level 3 assets and (liabilities). Concentration of Credit Risk —Financial instruments that potentially subject us to concentrations of credit risk are primarily cash and cash equivalents and investments. We generally place our cash and cash equivalents and investments with major financial institutions we deem to be of high-credit-quality in order to limit our credit exposure. We maintain our cash accounts with financial institutions where, at times, deposits exceed federal insurance limits. Inventory — Our inventory represents homes purchased with the intent of resale and are accounted for under the specific identification method. Direct home acquisition and improvement costs are capitalized and tracked directly with each specific home. Homes are stated in inventory at cost and are reviewed on a home by home basis. If a home's estimated market value is less than the inventory cost then the home is written down to net realizable value. We classify inventory into three categories: homes for sale, homes not available for sale, and homes under improvement. Homes for sale represent homes that are currently listed on the market for sale. Homes not available for sale are generally recently purchased homes that have been temporarily rented back by the prior owner and are not listed on the market for sale. The rental period is typically less than 30 days. Homes-under-improvement are homes that are in the process of being prepared to be listed for sale. Variable Interest Entities —In connection with establishing a secured revolving credit facility to support the financing of homes that it purchases, RedfinNow formed a special purpose entity called RedfinNow Borrower, which is a wholly owned subsidiary of Redfin Corporation. We have determined that RedfinNow Borrower is a variable interest entity ("VIE") and that we are the primary beneficiary of the variable interest in RedfinNow Borrower based on our power to direct the activities that most significantly impact the economic outcomes of the entity through our role in designing the entity and managing the homes purchased and sold by the entity. We have potentially significant variable interest in the entity based upon our equity interest held in the VIE. As we have concluded that we are the primary beneficiary, we have included the accounts of the VIE in our consolidated financial statements. The lenders of the secured revolving credit facility do not have recourse against the general credit of the primary beneficiary beyond the circumstances disclosed in Note 14. See Note 14 for a summary of the secured revolving credit facility, including outstanding borrowings associated with the VIE and related collateral. Loans Held for Sale —Redfin Mortgage, a wholly owned subsidiary of Redfin Corporation, began originating residential mortgage loans in March 2017. Such mortgage loans are intended to be sold in the secondary mortgage market within a short period of time following origination. Mortgage loans held for sale consist of single-family residential loans collateralized by the underlying home. Mortgage loans held for sale are recorded at fair value based on either sale commitments or current market quotes for mortgage loans with similar characteristics. Other Current Assets —Other current assets consist primarily of miscellaneous non-trade receivables and interest rate lock commitments from mortgage origination operations (see Derivative Instruments below). Derivative Instruments —Redfin Mortgage is party to IRLCs with customers resulting from mortgage origination operations. IRLCs for single family mortgage loans that Redfin Mortgage intends to sell are considered free-standing derivatives. All free-standing derivatives are required to be recorded on our consolidated balance sheets at fair value. Since Redfin Mortgage can terminate a loan commitment if the borrower does not comply with the terms of the contract, and some loan commitments may expire without being drawn upon, these commitments do not necessarily represent future cash requirements. Interest rate market risk, related to the residential mortgage loans held for sale and IRLCs, is offset using forward sales commitments. We manage this interest rate risk through the use of forward sales commitments on both a best effort whole loans basis and on a mandatory basis. Forward sales commitments entered in to on a mandatory basis are done through the use of commitments to sell mortgage-backed securities. We do not enter into or hold derivatives for trading or speculative purposes. Changes in the fair value of IRLCs and forward sales commitments are recognized as revenue, and the fair values are reflected in other current assets and accrued liabilities, as applicable. We estimate the fair value of an interest rate lock commitment based on current market quotes for mortgage loans with similar characteristics, net of origination costs and fees adjusting for the probability that the mortgage loan will not fund according to the terms of commitment (referred to as a pull-through factor). The fair value measurements of our forward sales commitments use prices quoted directly to us from our counterparties. Property and Equipment —Property and equipment is recorded at cost and depreciated using the straight-line method over the estimated useful lives. Depreciation and amortization is included in cost of revenue, technology and development, and general and administrative and is allocated based on estimated usage for each class of asset. Leasehold improvements are amortized over the shorter of the lease term or the estimated useful life of the related asset. Upon retirement or sale, the cost of assets disposed of and the related accumulated depreciation are removed from the accounts, and any resulting gain or loss is reflected in the consolidated statements of operations. Repair and maintenance costs are expensed as incurred. Costs incurred in the preliminary stages of website and software development are expensed as incurred. Once an application has reached the development stage, direct internal and external costs relating to upgrades or enhancements that meet the capitalization criteria are capitalized in property and equipment and amortized on a straight-line basis over their estimated useful lives. Maintenance and enhancement costs (including those costs in the post-implementation stages) are typically expensed as incurred, unless such costs relate to substantial upgrades and enhancements to the websites (or software) that result in added functionality, in which case the costs are capitalized as well. Capitalized software development activities placed in service are amortized over the expected useful lives of those releases. We view capitalized software costs as either internal use, or market and product expansion. Currently, internal use and expansion useful lives are estimated at two to three years . Estimated useful lives of website and software development activities are reviewed annually or whenever events or changes in circumstances indicate that intangible assets may be impaired and adjusted as appropriate to reflect upcoming development activities that may include significant upgrades or enhancements to the existing functionality. Intangible Assets —Intangible assets are finite lived and mainly consist of trade names, developed technology, and customer relationships and are amortized over their estimated useful lives of ten years . The useful lives were determined by estimating future cash flows generated by the acquired intangible assets. Amortization expense is included in cost of revenue. Impairment of Long-Lived Assets —Long-lived assets are reviewed for impairment whenever events or changes in circumstances indicate that the carrying amount of such assets may not be recoverable. Recoverability of assets to be held and used is measured first by a comparison of the carrying amount of an asset to future undiscounted net cash flows expected to be generated by the asset. If such asset were considered to be impaired, an impairment loss would be recognized when the carrying amount of the asset exceeds the fair value of the asset. To date, no such impairment has occurred. Goodwill —Goodwill represents the excess of the purchase price over the fair value of the net tangible assets and identifiable intangible assets acquired in a business combination. Goodwill is not amortized, but is subject to impairment testing. We assess the impairment of goodwill on an annual basis, during the fourth quarter, or whenever events or changes in circumstances indicate that goodwill may be impaired. We assess goodwill for possible impairment by performing a qualitative assessment to determine whether it is more likely than not that the fair value of the reporting unit is less than its carrying amount. If we qualitatively determine that it is not more likely than the fair value of the reporting unit is less than its carrying amount, then no additional impairment steps are necessary. We performed a qualitative assessment and determined that it was not more likely than not that the fair value of our reporting unit for which goodwill has been assigned was less than its carrying amount. In evaluating whether it was more likely than not that the fair value of our reporting unit was less than its carrying amount we considered macroeconomic conditions, industry and market considerations, cost factors, overall financial performance, other relevant entity-specific events, potential events affecting its reporting unit, and changes in the fair value of our common stock. The primary qualitative factors we have considered in our analysis are our overall financial performance and the fair value of the reporting unit for which goodwill was assigned, which was substantially in excess of its book value. The aggregate carrying value of goodwill was $9,186 at December 31, 2019 and 2018. There have been no accumulated impairments to goodwill. Other Non-current Assets —Other assets consists primarily of leased building security deposits and an equity investment accounted for under the cost method. Leases —The extent of our lease commitments consists of operating leases for physical office locations with terms ranging from one to 11 years and finance leases for vehicles with terms of four years . We have accounted for the portfolio of leases by disaggregation based on the nature and term of the lease. Generally, the leases require a fixed minimum rent with contractual minimum rent increases over the term of the lease. Leases with an initial term of twelve months or less are not recorded on the balance sheet, but rather lease expense from these leases is recognized on a straight-line basis over the term of the lease. When available, the rate implicit in the lease to discount lease payments to present value would be used; however, none of our significant leases as of December 31, 2019 provide a readily determinable implicit rate. Therefore, we must estimate our incremental borrowing rate for each portfolio of leases to discount the lease payments based on information available at lease commencement. We have evaluated the performance of existing leases in relation to our leasing strategy and have determined that most renewal options would not be reasonably certain to be exercised. The right of use asset and related lease liability are determined based on the lease component of the consideration in each lease contract. We have evaluated our lease portfolio for appropriate allocation of the consideration in the lease contracts between lease and nonlease components based on standalone prices and determined the allocation per the contracts to be appropriate. Foreign Currency Translation —Our international operations generally use their local currency as their functional currency. Assets and liabilities are translated at exchange rates in effect at the balance sheet date. Income and expense accounts are translated at the average monthly exchange rates during the year. Resulting translation adjustments are reported as a component of other comprehensive income and recorded in accumulated other comprehensive income on our consolidated balance sheets. Income Taxes —Income taxes are accounted for using an asset and liability approach that requires the recognition of deferred tax assets and liabilities for the expected future tax consequences of temporary differences between the consolidated financial statement and tax bases of assets and liabilities at the applicable enacted tax rates. We establish a valuation allowance for deferred tax assets if it is more likely than not that these items will expire before we are able to realize their benefits or if future deductibility is uncertain. We believe that it is currently more likely than not that our deferred tax assets will not be realized and as such, have recorded a full valuation allowance for these assets. We evaluate the likelihood of the ability to realize deferred tax assets in future periods on a quarterly basis, and, when appropriate evidence indicates, will release the valuation allowance accordingly. The determination to provide a valuation allowance is dependent upon the assessment of whether it is more likely than not that sufficient taxable income will be generated to utilize the deferred tax assets. Based on the weight of the available evidence, which includes our historical operating losses, lack of taxable income, and accumulated deficit, we have provided a full valuation allowance against the U.S. tax assets resulting from the tax losses and credits carried forward. Revenue Recognition — We generate revenue primarily from commissions and fees charged on each real estate services transaction closed by our lead agents or partner agents , and from the sale of homes . Our key revenue components are brokerage revenue, partner revenue, property revenue, and other revenue. We have utilized the practical expedient in ASC 606 and elected not to capitalize contract costs for contracts with customers with durations of less than one year. We do not have significant remaining performance obligations or contract balances. Revenue earned but not received is recorded as accrued revenue in accounts receivable on our consolidated balance sheets, net of an allowance for doubtful accounts. Accrued revenue consisting of commission revenue, is known and is clearing escrow, and therefore it is not estimated. Nature and Disaggregation of Revenue Real Estate Services Brokerage Revenue— Brokerage revenue includes our offer and listing services, where our lead agents represent home buyers and home sellers. We recognize commission-based brokerage revenue upon closing of a brokerage transaction, less the amount of any commission refunds, closing-cost reductions, or promotional offers that may result in a material right. The transaction price is calculated by taking the agreed upon commission rate and applying that to the home's selling price. Brokerage revenue primarily contains a single performance obligation that is satisfied upon the closing of a real estate services transaction, at which point the entire transaction price is earned. We are not entitled to any commission until the performance obligation is satisfied and are not owed any commission for unsuccessful transactions, even if services have been provided. We may offer promotional pricing which results in a material right to our customers and represents an additional performance obligation, in which the transaction price is allocated based on standalone selling prices. Our promotional pricing offers have not resulted in a material impact to timing of revenue recognition or contract liabilities with our customers for the periods presented. Partner Revenue— Partner revenue consists of fees paid to us from partner agents or under other referral agreements, less the amount of any payments we make to customers. We recognize these fees as revenue on the closing of a transaction . The transaction price is a fixed percentage of the partner agent's commission. The partner agent or other entity related to our referral agreements directly remits the referral fee revenue to us. We are not entitled to any referral fee revenue until the related referred real estate services transaction closes. Properties Properties Revenue— Properties revenue consists of revenue earned when we sell homes that were previously bought directly from homeowners . Properties revenue is recorded at closing on a gross basis, representing the sales price of the home. Our contracts with customers contain a single performance obligation that is satisfied upon a transaction closing. We do not offer warranties for sold homes, and there are no continuing performance obligations following the transaction close date. Other Other Revenue— Other services revenue includes fees earned from mortgage origination services, title settlement services, Walk Score data services, and advertising. Substantially all fees and revenue from other services are recognized when the service is provided. Mortgage banking services are not subject to the guidance in ASC 606 as the scope of the standard does not apply to revenue on contracts accounted for under Transfers and Servicing (Topic 860) but are included in other services revenue to reconcile total revenue presented on the consolidated statements of operations to the disaggregation of revenue table below. Intercompany Eliminations Intercompany Eliminations— Revenue earned from transactions between operating segments are eliminated in consolidating our financial statements. Intercompany transactions primarily consist of services performed from our real estate services segment for our properties segment. Accounts Receivable and Allowance for Doubtful Accounts — We establish an allowance for doubtful accounts after reviewing historical experience, age of accounts receivable balances and any other known conditions that may affect collectability. The majority of our transactions are processed through escrow and collectability is not a significant risk. Accounts receivable related to real estate services and properties transactions represents closed transactions for which the cash has not yet been received. Cost of Revenue — Cost of revenue consists primarily of personnel costs (including base pay, benefits, and stock-based compensation), transaction bonuses, home-touring and field expenses, listing expenses, home costs related to our properties segment, office and occupancy expenses, and depreciation and amortization related to fixed assets and acquired intangible assets. Home costs related to our properties segment include home purchase costs, capitalized improvements, selling expenses directly attributable to the transaction, and home maintenance expenses. Technology and Development —Technology and development expenses primarily include personnel costs (including base pay, benefits, and stock-based compensation), data licenses, software and equipment, and infrastructure such as for data centers and hosted services. The expenses also include amortization of capitalized internal-use software and website and mobile application development costs. We expense research and development costs as incurred and record them in technology and development expenses. Advertising and Advertising Production Costs —We expense advertising costs as they are incurred and production costs as of the first date the advertisement takes place. Advertising costs totaled $62,536 , $33,457 , and $21,902 in 2019, 2018, and 2017 respectively, and are included in marketing expenses. Advertising production costs totaled $2,029 , $1,644 , and $1,609 in 2019, 2018, and 2017, respectively, and are included in marketing expenses. Stock-based Compensation — We account for stock-based compensation by measuring and recognizing as compensation expense the fair value of all share-based payment awards made to employees, including stock options and restricted stock unit awards, and shares forecasted to be issued pursuant to our ESPP, in each case based on estimated grant date fair values. Stock-based compensation expense is recognized over the requisite service period on a straight-line basis. The Black-Scholes-Merton option-pricing model is used to determine the fair value for stock options and shares forecasted to be issued pursuant to our ESPP. For restricted stock unit awards and performance stock unit awards we use the market value of our common stock on the date of grant to determine the fair value of the award. In valuing stock options and shares forecasted to be issued pursuant to our ESPP, we make assumptions about expected life, stock price volatility, risk-free interest rates and expected dividends. Expected Life —The expected term was estimated using the simplified method allowed under guidance from the U.S. Securities and Exchange Commission as our historical share option exercise experience does not provide a reasonable basis upon which to estimate expected term. Volatility —The expected stock price volatility for our common stock was estimated by taking the average historical price volatility for industry peers based on daily price observations. Industry peers consist of several public companies in the real estate brokerage and technology industries. Risk-Free Rate —The risk-free interest rate is based on the yields of U.S. Treasury securities with maturities similar to the expected term of the options for each option group. Dividend Yield —We have never declared or paid any cash dividends and do not presently plan to pay cash dividends in the foreseeable future. Consequently, an expected dividend yield of zero was used. Forfeiture Rate —Beginning on January 1, 2017, we adopted Accounting Standard Update ("ASU") 2016-09 and elected to account for forfeitures as they occur. Recently Adopted Accounting Pronouncements — In January 2019, we adopted ASU 2016-02, Leases (Topic 842) , using the optional alternative transition method under ASU 2018-11, Leases (Topic 842) Targeted Improvements . The optional alternative transition method applies the new leases standard at the adoption date and recognizes a cumulative-effect adjustment to the opening balance of retained earnings in the period of adoption. We evaluated our portfolio of leases upon adoption and determined a cumulative-effect adjustment to the opening balance of retained earnings was not needed, as the portfolio of leases contained only operating leases. We elected the package of practical expedients permitted under the transition guidance within the standard, allowing us to carry forward the historical lease classification, carry forward the conclusions on whether current or expired contracts contain leases, and carry forward the accounting for initial direct costs for existing leases. Additionally, we elected the practical expedient for use of hindsight to determine the lease term for existing leases whereby we evaluated the performance of existing leases in relation to our leasing strategy and determined that most renewal options would not be reasonably certain to be exercised. This resulted in the shortening of lease terms for the existing leases. Adoption of the standard resulted in the recording of right of use assets and corresponding lease liabilities of $33,953 and $49,395 , respectively, as of January 1, 2019, the difference of which is due to lease incentives. Further description of the impact of this pronouncement is included in Note 6. In January 2019, we adopted the guidance in the SEC's final rule under Release No. 33-10532, Disclosure Update and Simplification. In August 2018, the SEC issued the final rule amending certain disclosure requirements that were redundant, duplicative, overlapping, outdated, or superseded. In addition, the amend |