← Articles

Calculating deadlines and interest in legal research

After 18 months of compounding and a capped daily penalty, the benchmark balance was 3,285,085.55. The model returned 3,285,083.95 on all five attempts.

The calculation tool performs named operations and returns the convention used. A business-day result gives the end date and identifies which date counted as day one.

Counting conventions

31 January plus one month can depend on how the governing rule handles month ends. A notice period can start on the date of service or the day after. The tool exposes the assumption so it can be checked.

Calculations

Calculated, not estimated

The model does not multiply in its head. It names an operation, and a program computes it. The figures are illustrative.

Penalty

penalty = debt × daily rate × days overdue
€1,500,000 × 0.1% × 120 days
= €180,000
Exact decimal arithmetic. When a contractual cap binds, the uncapped figure is shown beside it.

Periods

add one month to 31 January
31 Jan + 1 month
= 28 Feb
The convention comes with the result: clamped to the end of the month, start day not counted, holidays from the country’s own calendar.

What it computes

The tool handles dates, working-day adjustments, penalty and compound interest, VAT and aggregates.

Month arithmetic clamps to the last day of the target month. VAT requires an explicit rate. A binding penalty cap appears next to the uncapped amount.

Money uses exact decimal arithmetic. Ambiguous dates such as 03/12/2026 are rejected.

Working days across jurisdictions

Working weeks and holidays come from a maintained calendar dataset.

The lookup requires calendar data for the jurisdiction.

A decreed working Saturday can count as a working day. The tool reads working-day exceptions as well as days off.

We load and freeze a range of years before requests run. This prevents concurrent first lookups from reading a partly populated year.

Coverage varies by jurisdiction and can be partial. For example, fixed Indian holidays can be generated for years beyond those covered by the dataset's festival table.

A separate table records calendars checked against official decrees and the year through which they were checked. The tool flags unconfirmed transfers beyond that year.

Measuring whether it helps

We compared the same model and task prompts with and without real tool calls.

Ten tasks came from a pool of thirty. Twenty tasks that both conditions always solved were removed. Two retained tasks cover a changing balance and a payment schedule.

Expected answers were calculated independently. Before the model runs, we checked that the tool reproduced each one.

Results

DeepSeek v4-pro ran at temperature 0. Each condition had five repetitions per task. The working-Saturday case was added after a calendar correction.

TaskNo toolWith tool
Compound interest, then a capped penalty0/55/5
A two-thousand business day horizon0/55/5
A deadline across a decreed working Saturday1/55/5
Two months, a rolled deadline, and a business-day count3/55/5
VAT, a rolled deadline and a business-day penalty3/55/5
Counting backwards from a hearing date4/55/5
Fifteen business days on a Sunday-to-Thursday week4/55/5
Two competing deadlines, the later one applies4/55/5
The whole stack, with no roadmap4/55/5
Penalty on a shrinking balance5/55/5
How many payment dates fall on non-working days5/55/5
Total33/55 · 60%55/55 · 100%

Calls took about 1.6 times as long per task. The model used more input tokens and fewer output tokens.

Without the tool, the 2,000-working-day result missed by up to six weeks. The compounding task returned the same wrong figure in all five runs.

What the measurement changed

The model once advanced the start date before passing it to a function that already excludes the supplied start date. Moving that rule into the parameter description fixed the one-day error.

We combined date calculation and the optional non-working-day adjustment in one call so the adjustment could not be skipped.

An inclusive-count switch introduced double counting. We removed it and kept a single stated convention.

Two calendar errors

The calendar initially read transferred days off but missed the corresponding working Saturdays. A deadline crossing one of those Saturdays could land a day late.

We also found that the tool reported an applied calendar without flagging unverified transfers. The output now reports the coverage of those checks.

Reading the dataset's public methods removed more than 200 lines of code that tried to reconstruct working Saturdays.

Limits

The result covers 11 tasks, five repetitions per condition and the tool-calling loop. The benchmark checks arithmetic against expected answers. Calendar coverage and the choice of legal rule still need separate checks.

Questions and answers

Why use a calculation tool instead of letting the model do the arithmetic?

The model names an operation and a program computes it with exact decimal arithmetic. With the tool the model scored 55/55 on 11 tasks; without it, 33/55, or 60%.

What does the tool compute?

Dates, working-day adjustments, penalty and compound interest, VAT and aggregates. Each result states the counting convention used, and a binding penalty cap appears next to the uncapped amount.

Does it decide which legal rule applies?

No. The benchmark covers arithmetic, not the choice of legal rule. Ambiguous dates such as 03/12/2026 are rejected, and VAT requires an explicit rate.