Let K be a complete, algebraically closed nonarchimedean valued field, and let φ(z) ∈ K(z) have degree d ≥ 2. We study how the resultant of φ varies under changes of coordinates. For γ ∈ GL₂(K), we show that the map $γ ↦ ord(Res(φ^γ))$ factors through a function $ordRes_φ(·)$ on the Berkovich projective line, which is piecewise affine and convex up. The minimal resultant is achieved either at a single point in $P¹_K$, or on a segment, and the minimal resultant locus is contained in the tree in $P¹_K$ spanned by the fixed points and poles of φ. We give an algorithm to determine whether φ has potential good reduction. When φ is defined over ℚ, the algorithm runs in probabilistic polynomial time. If φ has potential good reduction, and is defined over a subfield H ⊂ K, we show there is an extension L/H with [L:H] ≤ (d+1)² such that φ has good reduction over L.