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 provide title and settlement services, originate and sell mortgages, and buy and sell homes directly from homeowners. In addition, we use digital platforms to connect consumers with rental properties. We have operations located in multiple states across the United States and certain provinces in Canada. 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”). Certain amounts presented in the prior period consolidated balance sheets have been reclassified to conform to the current period financial statement presentation. The change in classification does not affect previously reported total assets, total liabilities, mezzanine equity, or stockholders' equity in the consolidated balance sheets. Additionally, amounts presented in the prior period consolidated statements of cash flows have been reclassified to conform to the current period financial statement presentation. The change in classification does not affect previously reported cash flows from operating activities, investing activities, or financing activities in the consolidated statements of cash flows. 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 operate in the residential real estate industry and are a technology-focused company. Accordingly, we are affected by a variety of factors that could have a significant negative effect on our future financial position, results of operations, and cash flows. These factors include: negative macroeconomic factors affecting the health of the U.S. residential real estate industry, the impact of COVID-19 on the residential real estate industry, negative factors disproportionately affecting markets where 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 allocating and evaluating goodwill for impairment, current expected credit losses on certain financial assets, and fair value of assets acquired and liabilities assumed in connection with our acquisition of RentPath. 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. Restricted Cash —Restricted cash primarily consists of cash that is specifically designated to repay borrowings under warehouse credit facilities and the secured revolving credit facility. As of December 31, 2021, our restricted cash balance included $84,210 of deposits that were in excess of the amounts required as repayment under our secured revolving credit facility agreement but were legally restricted as to withdrawal as of December 31, 2021. These funds were disbursed to us in January 2022 and subsequently transferred to cash and cash equivalents in January 2022. Accounts Receivable, Net and Allowance for Credit Losses —We have three material classes of receivables: (i) real estate services receivables, (ii) receivables from the sale of homes through our properties business, and (iii) receivables from customers in relation to our rentals business. Accounts receivable related to these classes represent closed transactions for which cash has not yet been received. The majority of our transactions are processed through escrow and collectibility is not a significant risk. For transactions not directly processed through escrow, we establish an allowance for expected credit losses based on historical experience of collectibility, current external economic conditions that may affect collectibility, and current or expected changes to the regulatory environment in which we operate our businesses. We evaluate for changes in credit quality indicators on an annual basis or in the event of a material economic event or material change in the regulatory environment in which we operate. Investments —We have two types of investments: (i) investments in marketable securities that are available to support our operational needs, which are included in our consolidated balance sheets as short-term and long-term investments, and (ii) equity investments reported at fair value, which are included in our consolidated balance sheet as short-term investments. Marketable Securities Our short-term and long-term investments consist primarily of U.S. treasury securities, including inflation protected securities, and other federal or local government issued securities. 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 (loss) income. 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 securities are classified as long-term. We evaluate our available-for-sale debt securities, both ones classified as cash equivalents and as investments, for expected credit losses on a quarterly basis. An expected credit loss reserve is charged against the fair value of an available-for-sale debt security when it is identified, with a credit loss charged against net earnings. We review factors to determine whether an expected credit loss exists based on credit quality indicators, such as the extent to which the fair value as of the reporting date is less than the amortized cost basis, present value of cash flows expected to be collected, the financial condition and prospects of the issuer, adverse conditions specifically related to the security, and any changes to the credit rating of the security by a rating agency. Realized gains and losses are accounted for using the specific identification method. Purchases and sales are recorded on a trade date basis. 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 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 to 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 a 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 lender of the secured revolving credit facility does not have recourse against the general credit of the primary beneficiary beyond the circumstances disclosed in Note 15. See Note 15 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, originates residential mortgage loans. We have elected the fair value option for all loans held for sale and record these loans at fair value. Gains and losses from changes in fair value and direct loan origination fees and costs are recognized in net gain on loans held for sale. The fair value of loans held for sale is in excess of the contractual principal amounts by $660 and $1,353, respectively, as of December 31, 2021 and December 31, 2020. The mortgage loans we originate are intended to be sold in the secondary mortgage market within a short period of time following origination. Mortgage loans held for sale primarily 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. Interest income earned or expense incurred on loans held for sale is captured as a component of income from operations. 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 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 efforts whole loans basis and on a mandatory basis. Forward sales commitments entered into 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 and other liabilities, as applicable. We estimate the fair value of an IRLC 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, marketing, 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. 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 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 ranging from three 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 in the amount by which the carrying value of the asset exceeds its fair value. 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 perform impairment tests of goodwill at our reporting unit level. In order to test for goodwill impairment, we compare fair value of the reporting unit to its carrying value, including goodwill. If the fair value of the reporting unit is less than its carrying amount, goodwill is written down for the amount by which the carrying amount exceeds the reporting unit's fair value. However, the loss recognized cannot exceed the carrying amount of goodwill. We use discounted cash flow models and market data of comparable guideline companies to determine the fair value of a reporting unit. The assumptions used in these models are consistent with those we believe a market participant would use. We have the option to perform a qualitative assessment of goodwill rather than completing the impairment test. We consider macroeconomic conditions, industry and market considerations, cost factors, overall financial performance, other relevant entity-specific events, potential events affecting the reporting units, and changes in the fair value of our common stock. We must assess whether it is more likely than not that the fair value of the reporting unit is less than its carrying amount. If we conclude this is the case, we must perform the testing discussed above. Otherwise, we do not need to perform any further assessment. See Note 9 for more information. The aggregate carrying value of goodwill was $409,382 and $9,186 at December 31, 2021 and 2020, respectively. There have been no accumulated impairments to goodwill. Other Assets, Noncurrent —Other assets consists primarily of leased building security deposits and the noncurrent portion of prepaid assets. Leases —The extent of our lease commitments consists of operating leases for physical office locations with original terms ranging from one 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, 2021 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. Mezzanine Equity —We have issued convertible preferred stock that we have determined is a financial instrument with both equity and debt characteristics and is classified as mezzanine equity in our consolidated financial statements. The instrument was initially recognized at fair value net of issuance costs. We reassess whether the instrument is currently redeemable or probable to become redeemable in the future as of each reporting date, in which, if the instrument meets either criteria, we will accrete the carrying value to the redemption value based on the effective interest method over the remaining term. To assess classification, we review all features of the instrument, including mandatory redemption features and conversion features that may be substantive. All financial instruments that are classified as mezzanine equity are evaluated for embedded derivative features by evaluating each feature against the nature of the host instrument (e.g. more equity-like or debt-like). Features identified as embedded derivatives that are material are recognized separately as a derivative asset or liability in the consolidated financial statements. We have evaluated our convertible preferred stock and determined that its nature is that of an equity host and no material embedded derivatives exist that would require bifurcation on our consolidated balance sheets. See Note 11 for more information. 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 (loss) 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 balance sheets 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 account for uncertainty in income taxes in accordance with ASC 740, Income Taxes . Tax positions are evaluated utilizing a two-step process, whereby we first determine whether it is more likely than not that a tax position will be sustained upon examination by the tax authority, including resolutions of any related appeals or litigation processes, based on technical merit. If a tax position meets the more-likely-than-not recognition threshold, it is then measured to determine the amount of benefit to recognize in the financial statements. The tax position is measured as the largest amount of benefit that is greater than 50% likely to be realized upon ultimate settlement. Subsequent adjustments to amounts previously recorded impact the financial statements in the period during which the changes are identified. We recognize interest and penalties related to unrecognized tax benefits as income tax expense. Convertible Senior Notes —In accounting for the issuance of our convertible senior notes, we treat the instrument wholly as a liability, in accordance with the adoption of ASU 2020-06, Debt—Debt with Conversion and Other Options (Subtopic 470-20) and Derivatives and Hedging—Contracts in Entity's Own Equity (Subtopic 815-40): Accounting for Convertible Instruments and Contracts in an Entity's Own Equity ("ASU 2020-06"). Issuance costs are amortized to expense over the respective term of the convertible senior notes. For conversions prior to the maturity of the notes, we will settle using cash, shares of our common stock, or a combination of cash and shares of our common stock, at our election. The carrying amount of the instrument (including unamortized debt issuance costs) is reduced by cash and other assets transferred, with the difference reflected as a reduction to additional paid-in capital. The indentures governing our convertible senior notes allow us, under certain circumstances, to irrevocably fix our method for settling conversions of the applicable notes by giving notice to the noteholders. Our election to irrevocably fix the settlement method could affect the calculation of diluted earnings per share when applicable. We have no plans to exercise our rights to fix the settlement method. 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, from the sale of homes, and from subscription-based product offerings for our rentals business. Our key revenue components are brokerage revenue, partner revenue, properties revenue, rentals revenue, mortgage revenue, and other revenue. We have utilized the allowable practical expedient in the accounting guidance and elected not to capitalize costs related to obtaining contracts with customers with durations of less than one year. We do not have significant remaining performance obligations. Revenue earned but not received is recorded as accrued revenue in accounts receivable on our consolidated balance sheets, net of an allowance for credit losses. 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 Revenue Brokerage Revenue— Brokerage revenue includes our offer and listing services, where our lead agents represent homebuyers 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 generally 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 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. In conjunction with providing offering and listing services to our customers, we may offer promotional pricing or additional discounts on future services. This results in a material right to our customers and represents an additional performance obligation, for which the transaction price is allocated based on standalone selling prices. Amounts allocated to a promise to provide future listing or offering services at a significant discount are initially recorded as contract liabilities. Our promotional pricing and additional discounts have not resulted in a material impact to timing of revenue recognition. The balance of the corresponding contract liabilities are included in accrued and other liabilities on our consolidated balance sheets. See Note 10 for more information. 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 homebuyers and home sellers. 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 neither entitled to referral fee revenue, nor is our performance obligation satisfied, until the related referred home's sale closes. Properties Revenue Properties Revenue— Properties revenue consists of revenue earned when we sell homes that we 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. Rentals Revenue Rentals Revenue —Rentals revenue is primarily composed of subscription-based product offerings for internet listing services, as well as lead management and digital marketing solutions. Rentals revenue is recorded as a component of service revenue in our consolidated statements of comprehensive loss. Revenue is recognized upon transfer of control of promised service to customers over time in an amount that reflects the consideration we expect to receive in exchange for those services. Revenues from subscription-based services are recognized on a straight-line basis over the term of the contract, which generally have a term of less than one year. Revenue is presented net of sales allowances, which are not material. The transaction price for a contract is generally determined by the stated price in the contract, excluding any related sales taxes. We enter into contracts that can include various combinations of subscription services, which are capable of being distinct and accounted for as separate performance obligations. We allocate the transaction price to each performance obligation in the contract on a relative stand-alone selling price basis. Generally, the combinations of subscription services are fulfilled concurrently and are co-terminus. Our rentals contracts do not contain any refund provisions other than in the event of our non-performance or breach. Mortgage Revenue Mortgage Revenue— Mortgage revenue includes fees earned from mortgage origination services. Mortgage revenue is recognized (1) when an interest rate lock commitment is made to a customer, adjusted for a pull-through percentage, (2) for origination fees, when the purchase or refinance of a loan is complete, and (3) when the fair value of our interest rate lock commitments, forward sale commitments, and loans held for sale are recorded at current market quotes. Mortgage origination services are not subject to the guidance in ASC 606, Revenue from Contracts with Customers , as the scope of the standard does not apply to revenue on contracts accounted for under ASC 860 Transfers and Servicing. Other Revenue Other Revenue— Other services revenue includes fees earned from title settlement services, Walk Score data services, and advertising. Substantially all fees and revenue from other services are recognized when the service is provided. 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. 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, customer fulfillment costs related to our rentals 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, bonuses, benefits, and stock-based compensat |