236 JPMorgan Chase & Co./2020 Form 10-K Gains and losses on sales of loans Notes to consolidated financial statements The following tables summarize the Firm’s loan balances by portfolio segment. The following tables provide information about the carrying value of retained loans purchased, sold and reclassified to held-for-sale during the periods indicated. Loans that were reclassified to held-for-sale and sold in a subsequent period are excluded from the sales line of this table. Net gains/(losses) on sales of loans and lending-related commitments (including adjustments to record loans and lending-related commitments held- for-sale at the lower of cost or fair value) recognized in noninterest revenue was $(43) million for the year ended December 31, 2020 of which $(36) million was related to loans. Net gains on sales of loans was $394 million for the year ended December 31, 2019. Gains and losses on sales of loans was not material for the year ended December 31, 2018. In addition, the sale of loans may also result in write downs, recoveries or changes in the allowance recognized in the provision for credit losses. 2020 Year ended December 31, (in millions) Consumer, excluding  credit card Credit card Wholesale Total Purchases $ 3,474 $ — $ 1,159 $ 4,633 Sales 352 — 17,916 18,268 Retained loans reclassified to held-for-sale 2,084 787 1,580 4,451 2019 Year ended December 31, (in millions) Consumer, excluding  credit card Credit card Wholesale Total Purchases $ 1,282  $ —  $ 1,291  $ 2,573  Sales 30,474  —  23,445  53,919  Retained loans reclassified to held-for-sale 9,188  —  2,371  11,559  2018 Year ended December 31, (in millions) Consumer, excluding  credit card Credit card Wholesale Total Purchases $ 2,543  $ —  $ 2,354  $ 4,897  Sales 9,984  —  16,741  26,725  Retained loans reclassified to held-for-sale 36  —  2,276  2,312  (b)(c) (a) (b)(c) (a) (b)(c) (a) December 31, 2020 Consumer, excluding credit card Credit card Wholesale Total (in millions) Retained $ 302,127 $ 143,432 $ 514,947 $ 960,506 Held-for-sale 1,305 784 5,784 7,873 At fair value 15,147 — 29,327 44,474 Total $ 318,579 $ 144,216 $ 550,058 $ 1,012,853 December 31, 2019 Consumer, excluding credit card Credit card Wholesale Total (in millions) Retained $ 294,999  $ 168,924  $ 481,678  $ 945,601  Held-for-sale 3,002  —  4,062  7,064  At fair value 19,816  —  25,139  44,955  Total $ 317,817  $ 168,924  $ 510,879  $ 997,620  (b)(c) (a) (b)(c) (a) (a) In the third quarter of 2020, the Firm reclassified certain fair value option elected lending-related positions from trading assets to loans. Prior-period amounts have been revised to conform with the current presentation. (b) Excludes $2.9 billion of accrued interest receivables at both December 31, 2020 and 2019. The Firm wrote off accrued interest receivables of $121 million and $50 million for the years ended December 31, 2020 and 2019, respectively. (c) Loans (other than those for which the fair value option has been elected) are presented net of unamortized discounts and premiums and net deferred loan fees or costs. These amounts were not material as of December 31, 2020 and 2019. (a) Reclassifications of loans to held-for-sale are non-cash transactions. (b) Predominantly includes purchases of residential real estate loans, including the Firm’s voluntary repurchases of certain delinquent loans from loan pools as permitted by Government National Mortgage Association (“Ginnie Mae”) guidelines for the years ended December 31, 2020, 2019 and 2018. The Firm typically elects to repurchase these delinquent loans as it continues to service them and/or manage the foreclosure process in accordance with applicable requirements of Ginnie Mae, FHA, RHS, and/or VA. (c) Excludes purchases of retained loans sourced through the correspondent origination channel and underwritten in accordance with the Firm’s standards. Such purchases were $15.3 billion, $16.6 billion and $18.6 billion for the years ended December 31, 2020, 2019 and 2018, respectively.