Carl
Level 15

Investors & landlords

How long to I have to pay the gain,

So that you don't have to deal with an underpayment penalty, I would highly suggest you need the IRS 20% of your gain immediately, if not sooner. You can do so "right now" at www.irs.gov/payments. Make sure you print out your receipt and file it with your 2022 tax paperwork so you have it at tax filing time next year.

If your state also taxes personal income, then you should also pay your state a percentage equal to whatever your state's maximum income tax rate is. You'll pay your state separately from the IRS and get a physically separate receipt for that. How you pay  your state, depends on the state.  Check the website for your state's department of revenue or department of taxation for information.