Foreclosure is state law, and the states differ a lot
The same missed payments produce very different deadlines depending on where the property sits. Each page below gives the real day counts and the statutes they come from.

Utah
Non-judicial trustee's sale
Utah gives you a statutory three month cure window from the date the Notice of Default is recorded. If you do nothing else today, find out what date was recorded on your property and count forward.
Roughly 7 to 10 months from your first missed payment to a sale, with about 4 months of that after the Notice of Default is recorded.
Idaho
Non-judicial trustee's sale
Idaho requires the lender to include a loan modification request form with the Notice of Default, give you 30 days to return it, answer within 45 days, and hold off the sale until it does. Returning it is free and it stops the clock.
Roughly 5 to 8 months from your first missed payment to a sale. Returning the modification request form can extend it further.
Montana
Non-judicial trustee's sale under the Small Tract Financing Act
Unlike most states, Montana does not close your cure window months before the auction. If you can get current before the sale time, the foreclosure is cancelled. That changes what is worth attempting.
Roughly 7 to 10 months from your first missed payment to a trustee's sale, because the 120 day delinquency period and the 120 day notice period stack.
Wyoming
Non-judicial foreclosure by advertisement and sale
You get three months after the sale to redeem, and you keep possession during it. If you have already been through a sale, call anyway. Wyoming gives you more room after the auction than any other state we work in.
Roughly 120 to 180 days from your first missed payment to a sale, then three more months of redemption and possession. So about 7 to 9 months before you would have to leave.
North Dakota
Judicial foreclosure through district court
North Dakota gives you thirty days from the notice before foreclosure to pay the arrears and reinstate the loan, and that is the only reinstatement right the statute gives you. The sections that used to let you cure after the case was filed were repealed in 2005. If a notice before foreclosure has arrived, call somebody today rather than waiting to see what the lawsuit says.
Typically eight to fourteen months from your first missed payment to a sheriff's sale in an uncontested case, and longer if it is contested, if a complete loss mitigation application is in play, or if service has to be by publication. These are estimates built from the fixed parts of the statute, not a number the statute gives.
South Dakota
Sheriff's sale, either by advertisement or by court action
South Dakota gives no statutory right to catch up before an advertisement sale, which is the opposite of the states to the west. What it does give you is up to a year to redeem afterwards while still living in the house, and the right under SDCL 21-48-9 to make the lender prove its case to a judge instead. Both of those are things you have to act on. Neither happens by itself.
Typically six to ten months from your first missed payment to an advertisement sale, and roughly nine to eighteen months if it goes through the courts, longer if contested. Then the redemption period runs on top of that. These are estimates built from the fixed parts of the statute, not a number the statute gives.