If you are covered under a high-deductible health plan (HDHP), then you are eligible to contribute to an HSA. You must be considered an eligible individual on the first day of a month to take an HSA deduction for that month.
According to the Last-month rule, as long as you are an eligible individual on the first day of the last month of your tax year (December 1st for most taxpayers), then you are considered an eligible individual for the entire year.
The IRS states that you must remain an eligible individual during the Testing Period. The testing period begins with the last month of your tax year and ends on the last day of the 12th month following that month. If you fail to remain an eligible individual during this period, other than because of death or becoming disabled, you will have to include in income the total contributions made that would not have been made except for the last-month rule.
There is not a monthly HSA contribution limit, there are only annual contribution limits. To calculate how much you may contribute to meet your annual contribution limit, you may follow the table below:
Example. You are an eligible individual and have family HDHP coverage. In March you divorce and change your coverage as of April 1 to self-only. The contribution limit for the 3 months you both were considered to have family coverage is $ 1687.50 ($ 6750 × 3 ÷ 12). Your contribution limit for 9 months of self-only coverage is $ 2512.50 ($ 3350 × 9 ÷ 12).
For more information about HSA contributions and Form 8889, you may visit this IRS Page.