If you have a Roth IRA, "you can take your original contributions out at any time with no taxes or penalties," Orman says, and traditional IRAs and SEP IRAs work in similar ways.
As a last resort, you can take a loan from your Thrift Savings Plan (TSP), a retirement account for government workers, similar to a 401(k) or 403(b). If your plan allows you to take a loan, you can take money directly out of your balance without paying taxes or other penalties. Then you develop a plan to pay it back, including interest, within one to five years.
But, Orman warns, only use this option when you've exhausted all others. Even though you're paying back interest on the loan, when you sell, your shares are no longer growing in value, so you could lose a lot more than just interest. Plus, if you aren't able to replace the entire loan on time, you could also owe taxes or other penalties.