The price tag is finally in for the long rebuild of the Longfellow Bridge: $305.5 million, putting it a couple million over budget.

The Massachusetts Department of Transportation on Monday set that number in stone, finalizing a settlement with the contractor to end any disputes over additional costs of the project, which ended up taking two years longer than originally planned.

When the project was first awarded to the construction companies JF White, Skanska, and Consigli, it was supposed to take three years. The state budgeted for it to cost no more than $303.7 million — a figure that included the possibility of cost overruns as well as police details.