The following table summarizes the components of our accumulated other comprehensive income (loss) as of October 31, 2017 and 2016, net of tax effect:
| | | | | | | | | | October 31, | | 2017 | | 2016 | | (in millions) | Foreign currency translation, net of tax expense of $(8) and $(5) for 2017 and 2016, respectively | $ | (156 | ) | | (197 | ) | Unrealized losses (including prior service benefit) on defined benefit plans, net of tax benefit of $127 and $176 for 2017 and 2016, respectively | (188 | ) | | (305 | ) | Unrealized gains (losses) on derivative instruments, net of tax benefit of $2 and $2 for 2017 and 2016, respectively | (2 | ) | | (1 | ) | Total accumulated other comprehensive loss | $ | (346 | ) | | $ | (503 | ) |
Changes in accumulated other comprehensive income (loss) by component and related tax effects for the years ended October 31, 2017 and 2016 were as follows (in millions):
| | | | | | | | | | | | | | | | | | | | | | | | | | Net defined benefit pension cost and post retirement plan costs | | | | | | | Foreign currency translation | | Prior service credits | | Actuarial Losses | | Unrealized gains (losses) on derivatives | | Total | | | (in millions) | As of October 31, 2015 | | $ | (189 | ) | | $ | 161 |
| | $ | (365 | ) | | $ | 2 |
| | $ | (391 | ) | | | | | | | | | | | | Other comprehensive income (loss) before reclassifications | | (5 | ) | | 6 |
| | (171 | ) | | (10 | ) | | (180 | ) | | | | | | | | | | | | Amounts reclassified out of accumulated other comprehensive income | | — |
| | (29 | ) | | 43 |
| | 3 |
| | 17 |
| | | | | | | | | | | | Tax benefit | | (3 | ) | | 8 |
| | 42 |
| | 4 |
| | 51 |
| | | | | | | | | | | | Other comprehensive loss | | (8 | ) | | (15 | ) | | (86 | ) | | (3 | ) | | (112 | ) | | | | | | | | | | | | As of October 31, 2016 | | $ | (197 | ) | | $ | 146 |
| | $ | (451 | ) | | $ | (1 | ) | | $ | (503 | ) | | | | | | | | | | | | Other comprehensive income (loss) before reclassifications | | 44 |
| | — |
| | 116 |
| | — |
| | 160 |
| | | | | | | | | | | | Amounts reclassified out of accumulated other comprehensive income | | — |
| | (9 | ) | | 59 |
| | (1 | ) | | 49 |
| | | | | | | | | | | | Tax (expense) benefit | | (3 | ) | | 3 |
| | (52 | ) | | — |
| | (52 | ) | | | | | | | | | | | | Other comprehensive income (loss) | | 41 |
| | (6 | ) | | 123 |
| | (1 | ) | | 157 |
| | | | | | | | | | | | As of October 31, 2017 | | $ | (156 | ) | | $ | 140 |
| | $ | (328 | ) | | $ | (2 | ) | | $ | (346 | ) | | | | | | | | | | | |
|