Bernie Blegen
Vice President and Chief Financial Officer at Monolithic Power Systems
Thanks, Gen.
In 2021, MPS surpassed the $1 billion revenue milestone by achieving record full year revenue $1.2 billion, 43.0% higher than the prior year. This performance represented consistent execution against our strategies and being recognized by more first tier companies for our superior technologies, product quality and excellent customer support.
As we see more highly quality growth opportunities ahead of us, we continue to invest in our infrastructure and operational capabilities. In 2021, MPS grew capacity by 40%, and we are on track to expand capacity in 2022 well beyond $2 billion, allowing the company to successfully ramp new product revenue and achieve strategic market share gains.
Here are a few highlights which we achieved in 2021. Brought online a new 8-inch fab and continued to qualify parts in the 12-inch fab we brought online in 2020. We will continue to invest in growing fab and assembly capacity. We design processor cores and MCU technology into products requiring more sophisticated power solutions such as USB power delivery, smart motor drives, and high power electrifications.
Our first prototype of a high-precision analog digital converter product for medical applications achieved outstanding silicon performance in lab evaluations. We have started customer sampling in Q1 2022. Validation of this technology is a strong first step in developing a new business segment supporting both industrial and infrastructure end market applications.
We believe new product revenue from a large number of previously released designs will ramp in 2022. The representative sample includes products supporting applications in: VR14, 5G, BMS, ADAS, AI, USB PD, DDR, and many more.
Turning to our full year 2021 revenue by market segment compared with 2020. Automotive revenue was up 87.5%; computing and storage revenue up 47.0%; industrial revenue up, 54.5%; consumer revenue, up 28.1%; and communications revenue up 15.3%, demonstrating just how broad-based our full year 2021 revenue improvement was.
Automotive revenue grew $95.4 million to $204.3 million in 2021. This 87.5% year-over-year gain primarily represented increased sales of our highly integrated applications supporting the digital cockpit, automated driver assistance systems, and connectivity. Automotive revenue represented 16.9% of MPS' full-year 2021 revenue compared with 12.9% in 2020.
Full-year 2021 computing and storage revenue grew $119.1 million over the prior year to $372.3 million. This 47.0% increase primarily resulted from strong sales growth for enterprise notebooks, cloud computing and storage applications. Computing and storage revenue represented 30.8% of MPS' total revenue in 2021 compared with $30.0% in 2020.
Industrial revenue grew $65.2 million to $184.8 million in 2021. This 54.5% year-over-year increase was broad based with each of our primary product lines enjoying better than double-digit revenue growth. Industrial revenue represented 15.3% of MPS' full-year 2021 revenue compared with 14.2% in 2020.
Consumer revenue grew $61.9 million to $282.3 million, reflecting increased product sales for home appliances and smart TVs. Consumer revenue represented 23.4% of MPS' full-year 2021 revenue compared with 26.1% in 2020. Communications revenue grew $21.8 million to $164.1 million. This 15.3% improvement reflected higher sales of products for both infrastructure and wireless routers and gateway applications. Communications revenue represented 13.6% of our 2021 revenue, compared with 16.9% in 2020.
Switching to Q4, MPS had a record fourth quarter with revenue of $336.5 million, 4.0% higher than revenue generated in the third quarter of 2021 and 44.4% higher than the comparable quarter in 2020. By market segment, revenue for Computing and Storage grew 91.6% year-over-year; Communication grew 54.7%; Automotive grew 43.2%; Industrial grew 33.3%; and Consumer grew 1.9%. Fourth quarter 2021 GAAP gross margin was 57.6%, same as third quarter 2021, and 230 basis points higher than the fourth quarter of 2020.
Our GAAP operating income was $78.6 million, compared to $77.1 million reported in the third quarter of 2021, and $40.0 million reported in the fourth quarter of 2020. Fourth quarter 2021 non-GAAP gross margin was 57.9%, 10 basis points higher than the third quarter of 2021 and 220 basis points higher than the fourth quarter of 2020. The year-over year-expansion in fourth quarter, non-GAAP gross margin was largely due to a shift in sales mix, favoring high value greenfield products and operational efficiency gains, which more than offset higher product input cost. MPS achieved noteworthy market share gains in 2021 due in large measure to product availability and disciplined sales price management. Our non-GAAP operating income was $112.0 million compared to $108.4 million reported in the prior quarter, and $66.3 million recorded in the fourth quarter of 2020.
Let's review our operating expenses. Our GAAP operating expenses were $115.3 million in the fourth quarter compared with $109.2 million in the third quarter of 2021, and $88.9 million in the fourth quarter of 2020. Our non-GAAP fourth quarter 2021 operating expenses were $83.0 million, up from the $78.7 million we spent in the third quarter of 2021 and up from the $63.6 million reported in the fourth quarter of 2020.
On both a GAAP and a non-GAAP basis, fourth quarter 2021 litigation expense was a credit balance of $420,000 compared with a $3.4 million expense in Q3 2021, and a $1.5 million expense in Q4 2020. The credit balance in fourth quarter 2021 litigation expense reflected in IP settlement, refund of a legal retainer and lower than anticipated fees. The differences between GAAP and non-GAAP operating expenses for the quarters discussed here are stock compensation expense and income or loss from an unfunded deferred compensation plan. Fourth quarter 2021 stock compensation expense, including $921,000 charge to cost of goods sold was $31.2 million, compared with $31.6 million recorded in the third quarter of 2021.
Switching to the bottom line. Fourth quarter 2021 GAAP net income was $72.7 million or $1.51 for fully diluted share, compared with $1.44 per share in the third quarter of 2021, and $0.90 per share in the fourth quarter of 2020. Q4 2021 non-GAAP net income was $102.1 million or $2.12 per fully diluted share, compared with $2.06 per share in the third quarter of 2021, and $1.31 per share in the fourth quarter of 2020. Fully diluted shares outstanding at the end of Q4 2021 were $48.2 million.
Now, let's look at the balance sheet. As of December 31, 2021, cash, cash equivalents and investments totaled $727.5 million, compared to $744.5 million at the end of the third quarter of 2021. For the fourth quarter of 2021, MPS generated operating cash flow of about $28.2 million compared with Q3 2021 operating cash flow of $117.8 million. The between quarter drop in operating cash flow primarily reflected a $51.3 million increase in inventory and higher accounts receivable.
Fourth quarter 2021 capital spending totaled $17.6 million. Accounts receivable ended the fourth quarter of 2021 at $104.8 million or 28 days of sales outstanding compared with the $79.9 million or 22 days of sales outstanding reported at the end of the third quarter of 2021, and $66.8 million or 26 days reported at the end of the fourth quarter of 2020.
Our internal inventories at the end of the fourth quarter of 2021 were $259.4 million, up from $208.1 million at the end of the third quarter of 2021. Calculated on a basis consistent with our past practice and as you can see from the webinar video, days of inventory rose to 166 days at the end of Q4 2021 from 134 days at the end of the third quarter of 2021. Historically, we have calculated days of inventory on hand as a function of the current quarter revenue. We believe comparing current inventory levels with the following quarter's revenue provides a better economic match. On this basis, again, you can see days of inventory increased to 152 days at the end of the fourth quarter of 2021 from 133 days at the end of the third quarter of 2021.
I would now like to turn to our Q1 2022 outlook. We are forecasting Q1 2022 revenue in the range of $354 million to $366 million. We also expect the following, GAAP gross margin in the range of 57.4% to 58.0%, non-GAAP gross margin in the range of 57.7% to 58.3%. Total stock-based compensation expense of $36.9 million to $38.9 million including approximately $1.1 million that would be charged to cost of goods sold. GAAP, R&D and SG&A expenses between $119.2 million and $123.2 million. Non-GAAP, R&D and SG&A expenses to be in the range of $83.4 -- $85.4 million. This estimate excludes stock compensation and litigation expenses.
Litigation expenses to be in the range of $2.3 million to $2.7 million. Interest income is expected to range from $1.0 million to $1.4 million before foreign exchange gains or losses. Fully diluted shares to be in the range of 47.8 million to 48.8 million shares. Finally, I'm pleased to announce a 25% increase in our quarterly dividend to $0.75 per share from $0.60 per share for stockholders of record as of March 31, 2022.
In conclusion, MPS' strong financial performance in 2021 was largely due to a 40% increase in fab and assembly capacity, which supported our high-value greenfield product revenue ramp. Looking ahead, NPS is on track to expand capacity in 2022 well beyond $2 billion, allowing the company to successfully ramp new product revenue and achieve strategic market share gains in 2023, 2024, and beyond.