How it's worked out and how long it lasts
There's no formula. There is a time limit.
Unlike child support, spousal maintenance isn't calculated by a set formula. It's an amount the court considers reasonable for one person to pay and the other to receive, on the evidence of need and capacity. It can be periodic, a lump sum, or built into the property settlement, and it can be interim, while the wider matter is sorted, or longer term.
Orders can be varied or ended when circumstances change, and maintenance usually ends if the recipient remarries. The deadline matters: an application must be made within 12 months of a divorce becoming final, or two years from a de facto separation, unless the court gives permission to apply late.