(In millions, except percentages and per share amounts)
2019
2018
2017
Percentage Change 2019 Versus 2018
Percentage Change 2018 Versus 2017
Revenue
$   125,843
$  110,360
$  96,571
14%
14%
Gross margin
82,933
72,007
62,310
15%
16%
Operating income
42,959
35,058
29,025
23%
21%
Net income
39,240
16,571
25,489
137%
(35)%
Diluted earnings per share
5.06
2.13
3.25
138%
(34)%
Non-GAAP operating income
42,959
35,058
29,331
23%
20%
Non-GAAP net income
36,830
30,267
25,732
22%
18%
Non-GAAP diluted earnings per share
4.75
3.88
3.29
22%
18%
non-gaap operating income net income and diluted earnings per share - “ eps ” exclude the net tax impact of transfer of intangible properties the net tax impact of the tcja and restructuring expenses .
refer to the non-gaap financial measures section below for a reconciliation of our financial results reported in accordance with gaap to non-gaap financial results .
fiscal year 2019 compared with fiscal year 2018 .
revenue increased $ 15 .
5 billion or 14 % driven by growth across each of our segments .
intelligent cloud revenue increased driven by server products and cloud services .
productivity and business processes revenue increased driven by office and linkedin .
more personal computing revenue increased driven by surface gaming and windows .
gross margin increased $ 10 .
9 billion or 15 % driven by growth across each of our segments .
gross margin percentage increased slightly due to gross margin percentage improvement across each of our segments and favorable segment sales mix .
gross margin included a 5 percentage point improvement in commercial cloud primarily from azure .
operating income increased $ 7 .
9 billion or 23 % driven by growth across each of our segments .
key changes in expenses were : • cost of revenue increased $ 4 .
6 billion or 12 % driven by growth in commercial cloud surface and gaming .
• research and development expenses increased $ 2 .
2 billion or 15 % driven by investments in cloud and artificial intelligence - “ ai ” engineering gaming linkedin and github .
• sales and marketing expenses increased $ 744 million or 4 % driven by investments in commercial sales capacity linkedin and github offset in part by a decrease in marketing .
sales and marketing expenses included a favorable foreign currency impact of 2 % .
current year net income included a $ 2 .
6 billion net income tax benefit related to intangible property transfers and a $ 157 million net charge related to the enactment of the tcja which together resulted in an increase to net income and diluted eps of $ 2 .
4 billion and $ 0 .
31 respectively .
prior year net income and diluted eps were negatively impacted by the net charge related to the enactment of the tcja which resulted in a decrease to net income and diluted eps of $ 13 .
7 billion and $ 1 .
75 respectively .
fiscal year 2018 compared with fiscal year 2017 .
revenue increased $ 13 .
8 billion or 14 % driven by growth across each of our segments .
productivity and business processes revenue increased driven by linkedin and higher revenue from office .
intelligent cloud revenue increased primarily due to higher revenue from server products and cloud services .
more personal computing revenue increased driven by higher revenue from gaming windows search advertising and surface offset in part by lower revenue from phone .
gross margin increased $ 9 .
7 billion or 16 % due to growth across each of our segments .
gross margin percentage increased slightly driven by favorable segment sales mix and gross margin percentage improvement in more personal computing .
gross margin included a 7 percentage point improvement in commercial cloud primarily from azure .
operating income increased $ 6 .
0 billion or 21 % driven by growth across each of our segments .
linkedin operating loss increased $ 63 million to $ 987 million including $ 1 .
5 billion of amortization of intangible assets .
operating income included a favorable foreign currency impact of 2 % .
key changes in expenses were : • cost of revenue increased $ 4 .
1 billion or 12 % mainly due to growth in our commercial cloud gaming linkedin and search advertising offset in part by a reduction in phone cost of revenue .
• sales and marketing expenses increased $ 2 .
0 billion or 13 % primarily due to linkedin expenses and investments in commercial sales capacity offset in part by a decrease in windows marketing expenses .
• research and development expenses increased $ 1 .
7 billion or 13 % primarily due to investments in cloud engineering and linkedin expenses .
• general and administrative expenses increased $ 273 million or 6 % primarily due to linkedin expenses .
fiscal year 2018 net income and diluted eps were negatively impacted by the net charge related to the enactment of the tcja which resulted in a decrease to net income and diluted earnings per share of $ 13 .
7 billion and $ 1 .
75 respectively .
fiscal year 2017 operating income net income and diluted eps were negatively impacted by restructuring expenses which resulted in a decrease to operating income net income and diluted eps of $ 306 million $ 243 million and $ 0 .
04 respectively .

Question: What were the total expenses in 2019?
Answer: 82884

Question: How much were the research and development expenses in 2018?
Answer: 12.47

Question: Why did revenue increase by 14% from 2018 to 2019?
Answer: Revenue increased $15.5 billion or 14%, driven by growth across each of our segments. Intelligent Cloud revenue increased, driven by server products and cloud services. Productivity and Business Processes revenue increased, driven by Office and LinkedIn. More Personal Computing revenue increased, driven by Surface, Gaming, and Windows.

Question: How much was the LinkedIn operating loss in 2018?
Answer: LinkedIn operating loss increased $63 million to $987 million, including $1.5 billion of amortization of intangible assets.

Question: Why did research and development expenses increase in 2018?
Answer: Research and development expenses increased $1.7 billion or 13%, primarily due to investments in cloud engineering and LinkedIn expenses.

Question: How much were the general and administrative expenses in 2017?
Answer: 4277