# 2. Your first calculation

With the Payroll Agent demo connected and signed in, ask in plain language — English or Finnish:

> What does a monthly salary of 3 200 € for September 2026 cost the employer, and what is the net salary?

The agent should call `calculation_preview`, which calculates **without saving anything**:

```json
{
  "period": { "start": "2026-09-01", "end": "2026-09-30" },
  "salaryDate": "2026-09-30",
  "rows": [
    { "rowType": "monthlySalary", "count": 1, "price": 3200 }
  ]
}
```

Without an `employmentId` it calculates for a generic employee. Give one (from `employment_search`) and the calculation uses that employee's real data: age, pension and insurance, tax card.

## Save it and show the payslip

> Make that a salary calculation for one of my employees and show me the payslip.

Now the agent finds the employee with `employment_search`, creates the calculation with `calculation_create` and shows the slip with `calculation_show_slip`. A calculation is saved as a draft: **nothing is paid** until a person approves the payment (`invoice_preview`, then `invoice_confirm`), and the demo never pays anything.

## What comes back

The result carries the totals — gross salary, withholding tax, the employee's and the employer's contributions, net salary and the total cost to the employer. If something the calculation needs is missing — an address, an occupation code, a tax card — the result says so. A correct agent reads that before presenting anything as a finished payslip, and tells the user what is missing in business terms (*"the employee's address is missing"*). The payroll skills instruct agents to do exactly that.

## Try the hard ones

Plain monthly salary is easy. Finnish payroll is mostly exceptions — try these and watch what the agent does **without** the skills:

- *"Pay Erkki 45 € daily allowance for two days in Stockholm."* — a foreign daily allowance has its own rate by country and year.
- *"Add a car benefit for Erkki's car."* — which kind? Does the employer pay the fuel? The age group of the car?
- *"Pay my sole proprietorship's owner a salary of 2 000 €."* — the correct answer is **not to calculate**.

Without domain knowledge a model will guess. That is what the skills are for.

[Next: add the skills →](https://code.salaxy.com/get-started/agentic/skills.md)
