Update your spreadsheets with ready-made VBA functions for Danish statutory interest (procesrente), overtime calculation and rates for free choice accounts (fritvalgskonto) and pension.
Danish rules
This calculator applies Danish law and Danish collective agreements. It is for employment in Denmark and does not reflect the rules of other countries.
The macros, function names (e.g. =procesrente() and =Overtid()) and help sheets are in Danish and calculate under Danish rules.
Target files (.xlsx)
Click to choose one or more .xlsx files
Max 50 files · 20 MB per file
The Excel Macro Pack copies VBA macros and calculation sheets from the built-in template for Danish statutory interest (procesrente) into your own Excel files. You keep all your existing sheets — the template's calculation functions, lookup tables and macros are added on top. The functions calculate under Danish rules: statutory interest under the Danish Interest Act (renteloven) and overtime under Danish collective agreements (overenskomster). The function names, sheets and help texts in the workbook are in Danish. For a single claim you can use the statutory interest calculator directly in your browser.
Calculation functions
=procesrente()=rentedage()=Overtid()=Arbejdstid()Lookup functions
=FritvalgsOpslag()=PensionsOpslag_Arbejdsgiver()=PensionsOpslag_Lønmodtager()=PensionsOpslag()Macros
Create PDF with workingsExtend dates (with year markers)Extend pay periodUpdate interest rates from Danmarks NationalbankWhen you download an .xlsm file from the internet, Windows marks it as potentially unsafe. You must remove this block before Excel can run the macros.
The "Unblock" field only appears if Windows has blocked the file. If you don't see it, the file is already approved.
The first time you open the file, Excel shows a yellow warning bar at the top: "Macros have been disabled."
Alternatively: open the VBA editor with Alt+F11 and click Run, or use the ribbon under Developer → Macros.
All the functions below are user-defined VBA functions that the macro pack adds to your Excel file. You use them like ordinary Excel formulas with =functionname(...). The function and parameter names are Danish and must be typed exactly as shown — Excel does not translate them. Argument separators and built-in functions (TRUE/FALSE, EDATE) follow your own Excel language; the examples below use English Excel with commas.
=procesrente(beløb, fra, til, [forældelse], [rentetillæg], [sidstebankdag])
Calculates statutory interest (procesrente) under the rules of the Danish Interest Act (renteloven), using the European 30/360 day count. The interest rates are taken automatically from the 'renter' sheet (interest rates), which is updated from Danmarks Nationalbank. Handles limitation, the margin and banking-day rules.
Parameters
beløbAmount: the sum that bears interest (in DKK)fraFrom: the date from which interest starts to runtilTo: the date up to which interest is calculated (exclusive)forældelse (optional)Limitation date — no interest is calculated before this date. Enter 0 or leave the cell empty to start from the 'fra' daterentetillæg (optional)Margin on top of the reference rate. Numbers of 1 or more are percentage points (8 = 8%, 1 = 1%); numbers below 1 are decimals (8% = 0.08 = 8%). Default: 0sidstebankdag (optional)TRUE: interest runs from the day after the month's last banking day (e.g. 01-06-2024 → last banking day 28-06-2024 → interest from 29-06-2024). FALSE or omitted: the date is used as it isExample
=procesrente(1000, A4, A5, A6, 8, TRUE)Result: Statutory interest calculated incl. the 8% margin, with the banking-day shift
The function requires the 'renter' sheet to exist in the workbook. The interest rates are fetched automatically from Danmarks Nationalbank — see the section on automatic updating.
=rentedage(fra, til, [forældelsesdato], [sidstebankdag])
Calculates the number of interest days (30/360, European) in exactly the period on which procesrente charges interest with the same dates: from the start of interest (the 'fra' date, or the day after the last banking day if chosen, but no earlier than the limitation date) up to 'til'.
Parameters
fraFrom: the date from which interest runs, e.g. the month in which the pay fell due. An empty cell returns an empty celltilTo: the date up to which interest is calculatedforældelsesdato (optional)Limitation date: days before this date are not counted. Must be a date (not a number of months) — use e.g. EDATE(til, -36) for the 3-year limitation period for interestsidstebankdag (optional)TRUE: count from the day after the month's last banking day — like procesrente with TRUE. FALSE or omitted: from the 'fra' dateExample
=rentedage(B4, B5, B6, B8) — where B4=28-02-2019, B5=01-01-2025, B6=EDATE(B5, -36), B8=TRUEResult: 1080 (01-01-2022 → 01-01-2025; the days before the limitation date are not counted)
Give the same dates and the same sidstebankdag as in the procesrente formula, so the days match the interest calculation. If all 'fra' dates fall before the limitation date, the function returns 3 × 360 = 1080 days — that is the limitation of interest (renteforældelse). An explanation of each argument is shown in Excel's Function Arguments dialog (fx).
=Overtid(timenorm, arbejdstid, oprunding)
Calculates the overtime pay for one day in hours (overtime hours including the premium). The premium is calculated band by band from the named range 'tabel_overtid': each rate applies only to the hours in its band. The default table follows, for example, the Danish Industry Salaried Employees' Agreement (Industriens Funktionæroverenskomst) § 11(3) and the Salaried Employees' Agreement for Commerce, Knowledge and Service (Funktionæroverenskomsten for Handel, Viden og Service) § 3, no. 1: 50% for the first 3 hours, then 100%.
Parameters
timenormStandard hours: the normal working time as a decimal (e.g. 37 or 37.5)arbejdstidWorking time: the hours actually worked, as a decimaloprundingRounding: the time unit to round up to — e.g. 0.5 for half hoursExample
=Overtid(8, 12, 0.5)Result: 6.5 — 4 overtime hours: 3 × 1.5 + 1 × 2.0
Requires a named range 'tabel_overtid' with two columns: Fra timer (from hours) and Sats (rate), e.g. 0 | 0.50 and 3 | 1.00. The thresholds must be ascending; empty rows are skipped, and hours below the lowest threshold get no premium. The function does not know the time of day or the weekday — overtime on Sundays and public holidays (helligdage) (and, under the Commerce, Knowledge and Service agreement, between midnight and 06:00) is paid at 100% from the first hour and must be calculated separately.
=Arbejdstid(fra, til)
Calculates working time in hours as a decimal — also when the shift crosses midnight. Useful for calculating hours for night shifts and shift work.
Parameters
fraFrom: start time as a clock time (e.g. 22:00)tilTo: end time as a clock time (e.g. 02:00)Example
=Arbejdstid(C34, D34) — where C34=22:00, D34=02:00Result: 4 (4 hours of work across midnight)
The lookup functions look up rates in the Procentsatser sheet (percentage rates) based on a date. You can edit the rates directly in that sheet so they match your collective agreement (overenskomst). The functions always return the rate that applies on the given date.
=FritvalgsOpslag(dato)Looks up the free choice account (fritvalgskonto) rate for the given date. The rates are maintained in the Procentsatser sheet.
=FritvalgsOpslag(01-05-2023)Result: 7.00%
=PensionsOpslag_Arbejdsgiver(dato)Returns the employer's pension contribution for the given date.
=PensionsOpslag_Arbejdsgiver(01-05-2023)Result: 8.00%
=PensionsOpslag_Lønmodtager(dato)Returns the employee's pension contribution for the given date.
=PensionsOpslag_Lønmodtager(01-05-2023)Result: 4.00%
=PensionsOpslag(dato)Returns the total pension contribution (employer + employee) for the given date.
=PensionsOpslag(01-05-2023)Result: 12.00% (8% + 4%)
The rates are stored in the Procentsatser sheet. Edit them directly in the sheet so they match your collective agreement and company. The functions automatically find the correct rate based on the date you enter (dato = date).
You run the macros via Alt+F8 (the Macro dialog) or via buttons in the sheet. You can also open the VBA editor with Alt+F11 and run them directly. The macros' dialogs and messages are in Danish.
Alt+F8 → ProcesrentePDFFinds all =procesrente() formulas on the active sheet, calculates the interest period by period and exports a detailed report as a PDF file with one line per interest period.
Alt+F8 → UdvidDatoerStabilt_MedFormateringExtends a date-based table by adding months before and/or after the existing data range. Automatically marks each new year with double row height and a bold year.
Alt+F8 → UdvidLønperiodeSame principle as Extend dates, but aimed at pay period statements. Keeps the formulas and formatting from the first/last existing row and copies them to the new periods.
Alt+F8 → UpdateInterestRatesFetches the latest official statutory interest rates directly from Danmarks Nationalbank and updates the 'renter' sheet. Requires an internet connection. Typically used on 1 January and 1 July, when Danmarks Nationalbank publishes new rates.
The Danish statutory interest rate (procesrente) normally changes twice a year — on 1 January and 1 July. The macro pack automatically fetches the current rates directly from Danmarks Nationalbank's public XML feed.
The function OpdaterRenterHvisGammel() is called automatically when the workbook is opened, via Workbook_Open. It checks whether the interest sheet has already been updated in the current half-year — if so, nothing happens. If it is out of date, new rates are fetched automatically.
You can also update manually at any time via Alt+F8 → UpdateInterestRates.
The 'renter' sheet
The sheet is created automatically if it does not exist. It contains:
Column A
Date (1 Jan / 1 Jul)
Column B
Interest rate (decimal, e.g. 0.0375)
The table only shows historical and current rates — future dates are not included. The time of the latest update is stored in cell D1.
The data source is Danmarks Nationalbank's official XML endpoint: nationalbanken.dk/interestrates with type code UDL (the lending rate (udlånsrente) used for statutory interest).
Built-in template
Uses the fixed statutory interest template. No extra upload needed — just choose your target files and click "Add macros".
Upload your own source
Upload any .xlsm file as the source. Macros and sheets from your source file are copied into the selected target files.
Single file: downloaded directly as filename_macro-pack.xlsm.
Batch: all files are packed into macro-pack_files.zip. Files that could not be processed are listed in ERRORS.txt inside the zip file.
Your original .xlsx files are not affected.