More money than expected was collected through tax and higher National Insurance Contributions, although public sector spending also increased.
The state borrows to fund day-to-day spending as well as long-term infrastructure projects.
It is the last set of monthly inflation figures before the next interest rate decision on 5 February.
UK Inflation has dropped back from record highs but remains above the Bank of England's 2% target.
The interest rate set by the Bank of England affects mortgage, loan and savings rates for millions.