In the case of tax payable in installments, if the taxpayer has paid, as an installment of the tax, more than the amount determined to be the correct amount of such installment, the overpayment shall be credited against the unpaid installments, if any for the taxable year. If the amount already paid, whether or not on the basis of installments, exceeds the amount determined to be the correct amount of the tax due for the taxable year, the overpayment shall be credited or refunded as provided in section fourteen of this chapter.