It is shown that the differential virial theorem and its time-dependent extension are equivalent to the Euler equation for a quantum fluid. In light of this, the connection between the differential virial theorem and density-functional theory is also explored.