An automatic IRS extension for up to six months can be obtained by completing a form 4868 with the Internal Revenue Service, but the extension must be filed by or before the federal due date. Once filled, a 1040 return can be completed anytime within the six-month period. On the Form 4868, you will be asked to estimate your total tax liability.
https://www.irs.gov/pub/irs-pdf/f4868.pdf