# Find index of maximum value of array

**URL:** https://discourse.julialang.org/t/find-index-of-maximum-value-of-array/51525
**Category:** New to Julia
**Tags:** question
**Created:** [December 9, 2020, 1:37pm UTC](https://discourse.julialang.org/t/find-index-of-maximum-value-of-array/51525 "2020-12-09T13:37:34Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [December 9, 2020, 1:47pm UTC](https://discourse.julialang.org/t/find-index-of-maximum-value-of-array/51525/2 "2020-12-09T13:47:37Z")

</div>

You could use `findfirst(x -> x == maximum(X), X)` or `findfirst(==(maximum(X)), X)`, but the easiest thing to do is `argmax(X)`.

---

_[View the full topic](https://discourse.julialang.org/t/find-index-of-maximum-value-of-array/51525)._
