You did the correct thing by taking it today as IRS is very good about waving the penalty as long as it taken by the due date of the return filed.
Please review the answer below.
(Edited to put 2017 information below on 1/16/2018)
First, if you have not taken the missed RMD, take it ASAP so you can tell the IRS in the explanation statement that it has been taken.
You will need to file a 5329 form and request a waiver of the penalty. (The waiver would only be denied if there is no reasonable explanation and the missed RMD was not taken at all.)
Unfortunately this can only be done using the "forms" mode that is only available with the desktop software if you do not have a 1099-R to file.
If you do have a 2017 1099-R to report then the RMD question in the interview will go to the form 5329 waiver interview if you say that the 2017 RMD was not taken.
If you are using the CD/download version:
Enter the forms mode and click on open form. Type in 5329. Choose 5329-T for the taxpayer (first person listed on your tax return), or 5329-S (for spouse - 2nd person on tax return).
Scroll down to Part IX line 52 and enter the RMD amount that should have been taken. On line 53 enter the amount of the RMD that was actually taken (probably zero if it was missed).
Then in the box right under line 53 "Waver of Tax Smart Worksheet" enter the same amount as line 52 (the RMD amount). Then click the "Explanation" button and enter the reason for missing the RMD and your statement requesting a waiver.
You will not pay any penalty now until the IRS determines if it will grant the waver, then they will inform you if you owe the penalty.
OR - if using the Online version and have no 2017 1099-R to file, you will have to prepare the 5329 manually .
Download the 5329 form from the IRS website and fill it out the same as above. Print and mail your return with the 5329 form and explanation attached as described in the 5329 instructions.
The 2017 5329 must be attached to your printed and mailed 2017 tax return and cannot be e-filed.
[NOTE: You can only use this method if you are requesting a waiver of the penalty and there is no taxable amount on the 5329 form line 55 that must be transferred to the 1040 form]
From 5329 instructions:
"Waiver of tax. The IRS can waive part or all of this tax if you can show that any shortfall in the amount of distributions was due to reasonable error and you are taking reasonable steps to remedy the shortfall. If you believe you qualify for this relief, attach a statement of explanation and file Form 5329 as follows.
1. Complete lines 52 and 53 as instructed.
2. Enter “RC” and the amount you want waived in parentheses on the dotted line next to line 54. Subtract this amount from the total shortfall you figured without regard to the waiver, and enter the result on line 54.
3. Complete line 55 as instructed. You must pay any tax due that is reported on line 55.
The IRS will review the information you provide and decide whether to grant your request for a waiver. "
Download blank 2017 5329 form here:
Instructions: http://www.irs.gov/pub/irs-pdf/i5329.pdf (IRS still shows 2016 instructions, however the law has not changed in this area).