Your credits of €5440 appear to be: married €3300 + age €490 + paye €1650.
Based on you incomes and being over 65 you are not below the exemption limit (€36,000). However it is more beneficial to give you marginal exemption relief. I would calculate the tax & USC as follows:
Tax of €1,982.80
USC of € 639.28
total: €2,622.08
USC calculation:
€10,036 @ 2%= €200.72
€10,964 @ 4%= €438.56
USC due= €639.28
Tax Calculation 1 (using tax credits):
€21000 + €19,957 = €40,957
€40,957 @ 20%= €8,191.40
less credits: €5,440.00
tax due= €2,751.40
or
Tax Calculation 2 (using exemption):
total income €40957 - exemption €36000= €4957
€4957 @ 40%= €1,982.80
net tax due= €1,982.80 (the most beneficial of the 2 tax calculations)
(apologies for the duplication, I must have statred writing this as Mandelbrot posted his.)