In the quadratic case, it does. Given an irreducible quadratic polynomial $f(x)=ax^2+bx+c$, the discriminant of the quadratic number field $\frac{\mathbb{Q}[x]}{f(x)}$ is $\operatorname{sqf}(d)$ or $4\cdot \operatorname{sqf}(d)$, depending on if $d \equiv 1 \mod 4$, where $d=b^2-4ac$ is the polynomial discriminant of $f(x)$, and $\operatorname{sqf}$ is the squarefree part.


One can reduce this to the case of local fields, in which one can ask a similar question. Fix a positive integer $n$. Given a separable polynomial $f \in \mathbb{Q}\_p[x]$ of degree $n$, does the discriminant of $f$ determine the valuation of the discriminant ideal of the associated extension? What about in the case where $p \nmid n$?


For the question over local fields, one should note that the dependence on the discriminant of $f$ does *not* factor through the valuation of the discriminant of $f$.



Does the discriminant of an irreducible polynomial of a fixed degree determine the discriminant of the number field it generates?
Another counterexample:


$f\_1(x)=x^3-9x-20, f\_2(x)=x^3-6x-18$, discriminant = $-4\*27\*73$ for both $f\_1$ and $f\_2$.


Both polynomials are irreducible over $\mathbb{Q}$ by the rational root test.


The 2-adic Newton polygons show that $f\_1$ has 2 roots of valuation=0 and 1 root of valuation=2, and $f\_2$ has 3 roots of valuation=1/3. So the ring of integers is ramified over 2 for $f\_2$ but not for $f\_1$, and their discriminants are not equal.


I found these polynomials by looking for integer solutions $(a=-3,b=-10)$ to $3a^2+3a+1=-(2b+1)$ which yield polynomials $f\_1=x^3+3ax+2b, f\_2=x^3+3(a+1)x+2(b+1)$ with same discriminant=$-4\*27\*(b^2+a^3)$.


Note: The initial version of this answer had mistakes as reported in comments below by KConrad.


