The Short Version
The poem is widely dated to 1857 in editions and teaching materials, so the claim matches the standard shorthand. But the better scholarly caution is that 1857 is not directly proven as the full composition date: the poem may have been started in 1857 and finished or revised later, possibly around 1861. Stating 1857 as settled fact overstates the certainty.