If you mean the official WINNER: The winner is the team whose lead dog's nose crosses the line first. (This is only true if the musher is carrying all their required equipment in the sled.)
If you mean when is the race officially OVER, it's over when the "Widow's Lamp" is turned off. The Widow's Lamp is lit and hung on the Burled Arches (which stand above the finish line in Nome) when the race begins. That lamp remains lit as long as there are mushers on the trail. This goes back to an old tradition of leaving a lamp lit at way-posts along the old dog-mushing thoroughfares. Word would be sent ahead that a team was travelling, and the next way-post would light the lantern and keep it lit as long as there were dogs and mushers out on the trail. This was in part to help the incoming musher find his way - but it was also to remind everyone that there were dogs and mushers out there, driving through the snow and cold and dark, and that everyone should keep a watch until they were safe. The Widow's Lamp remained lit until the team made it in to the way-post, and the Iditarod keeps this tradition, leaving the lamp burning until the very last musher makes it to Nome. The Widow's Lamp isn't turned off - and the race isn't over - until the last musher is safe into Nome.
Chat with our AI personalities