Since you lived there for 2 of the last 5 years you'll get a $500k exclusion between the two of you (true even if you don't own the home as long as you file married filing jointly), so make sure the sale closes before your time living there cycles out of the 5 year period.
Remember that the gain is the sale price (after closing costs) minus the purchase price. You can also deduct capital improvements, but not repairs.
Since it was a rental you may have to pay some depreciation recapture on the amount of depreciation you took or could have taken even if you didn't take it. I'm not too familiar with this.
If your husband took a home office deduction you may also owe some depreciation recapture on that unless he used the simplified method.
Unfortunately, the capital gain counts towards the your income, so if your regular income is below the 0% capital gains tax bracket you'll pay 0% on some of the gain, but you'll pay the rate for each bracket the capital gain puts you in. The capital gain stacks on top of regular income.
Also, the $38k comment tells me you're looking at the single brackets. You should be looking at the married filing jointly brackets and including your income.
All around, that $500k exclusion is a pretty sweet deal and that's a lot of home value appreciation, so congrats on the windfall and the relatively low taxes you'll pay on it!
Check out
Publication 523 for more nitty gritty details on all of this.