EXCLUSIVE

Ben Affleck and Jennifer Garner are ending their 10 year marriage ... TMZ has learned.

We're told the couple, whose anniversary was yesterday, will file for divorce.

Although they will file for divorce, it won't be done immediately. They are working things out with a mediator and business managers, sources tell TMZ. The divorce will be filed when all of the property and custody issues are resolved.

We're told the divorce is amicable and Ben and Jen will share joint custody of their 3 children, ranging in ages from 3 to 9.