Tidex

Payroll reference

How Tidex calculates your pay

Every rule Tidex uses to turn your shifts into pay, tax and a payday, with worked examples you can check your numbers against.

Updated 30 September 2026

Common questions

Overview

Tidex prices each shift on its own, adds weekly overtime, then groups shifts by payday and applies tax.

The calculation in order

  1. Find the wage settings that were active on the shift date.
  2. Split the shift into periods wherever a supplement starts or stops.
  3. Remove unpaid time, using your exact pauses or the automatic break.
  4. Price each period at hours × (hourly wage + supplement).
  5. Leave out overlapping shifts, keeping only the lowest-paid one.
  6. Apply weekly overtime once a job passes its weekly hour limit.
  7. Assign the shift to a payday and apply the tax rate active on that payday.
  8. Add up the shifts and any manual adjustments for each payday.

Rules worth knowing

RuleWhat it means
Wage follows the shift date, tax follows the paydayA raise from 1 February applies to shifts on or after 1 February. A new tax rate from 1 February also applies to January shifts paid in February.
Night shifts belong to their start dateA shift from 22:00 on 15 January to 06:00 the next morning is a 15 January shift.
The break threshold is strictWith a 5.5-hour threshold, a shift of exactly 5.5 hours has no break deducted.
Supplements don't stackWhen two supplements cover the same minute, only the higher one is paid.
Overtime replaces supplementsAn overtime minute earns the overtime premium instead of the ordinary supplement.
Overlapping shifts count onceTotals keep the lowest-paid shift and cross out the others.
Pay is rounded once per shiftHours are never rounded. Base pay and supplement pay are each rounded to 2 decimals after the whole shift is added up.

Terms

TermMeaning
JobAn employer. Each job has its own wage settings, payday, pay period and currency.
Wage settingsHourly wage, supplements, overtime, break and tax rules, valid from a start date. Stored as a wage snapshot.
SupplementAn extra hourly amount for set hours, such as evenings or Sundays.
PauseAn exact unpaid interval you add to a shift.
Pay periodThe days whose work is paid together.
PaydayThe date a pay period is paid out.
AdjustmentA one-off amount on a payday, such as a bonus or back pay.
Gross / netPay before tax / pay after the estimated tax.

Shifts

A shift is a date, a start time and an end time. If the end is at or before the start, the shift runs past midnight.

Times

  • Times use 24-hour HH:MM. 24:00 is allowed and means the end of the day.
  • If the end time is at or before the start time, Tidex adds 24 hours to the end. 22:00 to 06:00 is 8 hours.
  • A shift belongs to the date it starts, even when it ends the next day.
  • Hours are exact to the minute.
  • A shift with an invalid time has no pay.

Recurring shifts

  • A recurring shift repeats on chosen weekdays every 1 to 9 weeks.
  • Tidex creates each occurrence when it needs it. Occurrences are not stored as separate shifts.
  • For every second week or more, Tidex counts whole weeks from the start date you picked for that weekday. Every second week matches when that count is even, every third week when it divides by 3, and so on.
  • You can skip single dates, and set pauses, supplements and notes for a single date.
  • Every occurrence belongs to the recurring shift's job.

Jobs

  • Each shift belongs to one job. Pay, payday and tax rules come from that job.
  • Every account has one default job. A shift saved without a job goes there.
  • A job's currency is set when the job is created and can't change.
  • Dashboard totals use one currency at a time and flag months that mix currencies.

Wage settings

Wage settings have a start date. Each shift uses the newest settings that started on or before its date.

What they contain

  • Hourly wage, and the tariff and level if you use one
  • Supplement rules
  • Overtime rules
  • Break rules
  • Tax on or off, and the tax percentage

Which settings apply

  1. Look only at the settings for the shift's job.
  2. Pick the newest settings whose start date is on or before the target date. The start date itself counts.
  3. If none have started yet, use the job's undated baseline settings.

The target date is the shift date for wage, supplements, overtime and breaks. For tax it is the payday. If a job has no settings of its own, Tidex uses the default job's settings.

Example

SettingsStartsHourly wageTax
BaselineNo date180.0025 %
January2025-01-01185.0030 %
February2025-02-01190.0035 %

A shift on 15 January 2025 that is paid on 20 February 2025 earns 185.00 an hour from the January settings and is taxed at 35 % from the February settings.

Missing or invalid values

ValueUsed instead
Hourly wage184.54, tariff level 1
BreakOn, proportional, 30 minutes after 5.5 hours
TaxOff
OvertimeOff
SupplementsThe built-in rules under Supplements, but only if the job has no wage settings at all

Tidex also limits tax to 0 to 100 %, ignores negative wages and supplements, and never deducts a break longer than the shift.

Supplements

A supplement adds an hourly amount during set hours on set weekdays. When several match the same minute, only the highest is paid.

How a rule works

FieldMeaning
daysWeekdays from 1 to 7. Monday is 1, Sunday is 7.
fromStart time. This minute is included.
toEnd time. This minute is not included. 24:00 means the end of the day.
rateFixed amount per hour.
percentPercent of the hourly wage. Used only when rate is empty or invalid.
{ "days": [1, 2, 3, 4, 5], "from": "18:00", "to": "21:00", "rate": 22 }
// Monday to Friday, 18:00 to 21:00, plus 22 an hour

Around midnight

  • The weekday is the day the window starts. A Friday window from 22:00 to 02:00 covers Friday night and early Saturday.
  • At midnight, the next day's rules take over. A Saturday evening supplement ends at 24:00 and the Sunday supplement starts.

Custom supplements on one shift

Supplements set on a single shift replace the job's rules for that shift. They apply on every weekday, including after midnight. An empty list means the shift has no supplements.

Built-in rules

Tidex uses these only when a job has no wage settings at all. Your own or your tariff's rules replace them.

PeriodDaysTimeSupplement
Weekday eveningMonday to Friday18:00-21:00+22 an hour
Weekday nightMonday to Friday21:00-24:00+45 an hour
Saturday afternoonSaturday13:00-15:00+45 an hour
Saturday late afternoonSaturday15:00-18:00+55 an hour
Saturday eveningSaturday18:00-24:00+110 an hour
SundaySundayAll day+115 an hour

Breaks

Pauses you enter always win. Without them, Tidex deducts an automatic break when the shift is longer than the threshold.

Exact pauses

  • Tidex cuts each pause out of the shift at its exact times.
  • Overlapping pauses are merged. A pause can cross midnight.
  • A shift with pauses gets no automatic break.
  • A recurring shift can have pauses for a single date.

Automatic break

  • By default the break is on and lasts 30 minutes when a shift is longer than 5.5 hours.
  • Longer means strictly longer. A shift of exactly 5.5 hours has no break.
  • The break is never longer than the shift.

Where the break comes from

MethodDeducts fromEffect
proportional (default)Every period, in proportion to its lengthBase pay and supplements shrink by the same share
base_onlyPeriods with the lowest supplement firstEvening and weekend hours stay paid
end_of_shiftThe last minutes of the shiftSame as leaving early
noneNothingAll hours are paid

Proportional deduction uses exact fractions of a minute. The other methods deduct whole minutes.

Example

A Wednesday shift from 22:00 to 06:00 has a 45 an hour supplement until 24:00. The shift is 8 hours, so a 30-minute proportional break applies. The 2 supplement hours lose 2/8 of it (7.5 minutes). The 6 plain hours lose 6/8 (22.5 minutes).

Overtime

Once a job passes its weekly hour limit, each further paid minute that week earns an overtime premium instead of the ordinary supplement.

How it works

  • Overtime is off unless the wage settings turn it on. Settings based on a tariff start with the tariff's overtime rules.
  • The default limit is 40 paid hours a week.
  • A week runs from Monday 00:00 to Sunday 24:00 in your time zone.
  • Hours count per job. Hours at two jobs are never added together.
  • Tidex counts paid hours in time order. Breaks and crossed-out overlapping shifts don't count.
  • A shift can be partly overtime. Overtime starts at the minute the limit is reached.
  • Overtime premium = hourly wage × overtime percent. It replaces the ordinary supplement for those minutes.
  • Each shift uses the overtime rules from the wage settings active on its date.

Default overtime rules

DaysTimePremium
Monday to Saturday00:00-21:0050 % of hourly wage
Monday to Saturday21:00-24:00100 % of hourly wage
SundayAll day100 % of hourly wage
Norwegian public holidaysAll day100 % of hourly wage

The rules must cover every minute of every day, public holidays included. If they don't, Tidex treats overtime as off. When several rules match, the highest percent wins.

Example

Hourly wage 200, no supplements, no breaks. Monday to Thursday from 08:00 to 18:00 adds up to 40 hours. A Friday shift from 08:00 to 12:00 is all overtime at 50 %, so it pays 4 × 200 base plus 4 × 100 premium, which is 1200.00.

Payday and tax

Each job has a pay period and a payday. A shift is paid on the payday of the period it falls in, and taxed at the rate active on that payday.

Pay periods

Pay periodCoversPayday
Calendar month (default)The 1st to the last day of the monthThe payroll day in the next month
Monthly from a start dayThe start day (1 to 28) to the day before the next start dayThe payroll day in the month the period ends, or in the month after
Every two weeks14-day blocks counted from an end date you choose0 to 27 days after the block ends

A payday in the month the period ends has to come after the period ends. If it doesn't, Tidex moves it to the next month. A payroll day past the end of a month becomes the last day, so day 31 in February is 28 or 29 February.

Payday shown in the app

If the payday falls on a weekend, a Monday or a Norwegian public holiday, the app shows the nearest earlier Tuesday to Friday that is not a holiday. This moves only the displayed date and countdown. Tax still uses the original payday.

Tax

  • Tax is a flat percentage from the wage settings active on the payday.
  • Net = gross × (1 − tax percent ÷ 100).
  • If the payday falls in the job's half-tax month (November or December), the tax percent is halved.
  • This is an estimate based on the percentage you enter. Your payslip uses your tax deduction card.

Example

A shift on 15 November, calendar-month pay period, payroll day 20. The payday is 20 December. With 30 % tax and December as the half-tax month, the shift is taxed at 15 %.

Totals

Totals add up the included shifts. Overlapping shifts count once, and adjustments only appear on payday totals.

Overlapping shifts

  • Two shifts on the same date overlap when their times intersect. One ending exactly when the other starts is not an overlap.
  • In each group of overlapping shifts, Tidex keeps the one with the lowest gross pay before overtime. If two tie, the one that starts first stays.
  • The other shifts stay visible but are crossed out. They don't count toward totals or overtime.

Adjustments

An adjustment is a one-off amount on a payday, such as a bonus, back pay or a correction. It is added to that payday's total and never changes a shift's hours or pay. An adjustment without a job uses the default job.

Tax treatmentNet amount
gross_taxableThe amount minus tax at the payday's rate, halved in the half-tax month
net_manualThe amount as entered
excluded_from_tax_estimateThe amount as entered

What each total means

TotalCalculation
Month totalIncluded shifts worked in the month. Net when tax is on, otherwise gross. No adjustments.
Earned so farThe same, counting only shifts that have ended.
Payday cardIncluded shifts in the pay period plus that payday's adjustments, for the next job to be paid. Jobs with the same payday share one card.
Average per shiftEarnings ÷ number of shifts
Average hourlyEarnings ÷ paid hours
Month over month(this month − last month) ÷ last month × 100

Reference

Formulas, rounding and the database fields behind the rules above.

Formulas

duration_hours = (end - start) / 60        // add 1440 to end when end <= start
paid_hours     = duration_hours - unpaid_hours

base_pay       = round2(sum(period_hours * hourly_wage))
supplement_pay = round2(sum(period_hours * supplement_rate))
gross          = round2(base_pay + supplement_pay)

tax_percent    = half_tax_month ? tax_percentage / 2 : tax_percentage
net            = gross * (1 - tax_percent / 100)

round2 rounds to 2 decimals, halves away from zero. A period's supplement_rate is the highest matching supplement, or the overtime premium for overtime minutes.

user_shifts

ColumnMeaning
job_idThe job. Set to the default job when missing.
shift_dateStart date, YYYY-MM-DD
start_time, end_timeHH:MM. An end at or before the start crosses midnight.
custom_pause_windows{ windows: [{ start, end }] }
custom_supplementsReplaces the job's supplement rules for this shift

recurring_shifts

ColumnMeaning
repeat_interval_weeks0 is every week, 1 every second week, up to 8 for every ninth week
selected_daysStart date per weekday, { "1": "2025-01-27" }. Here 0 is Sunday and 6 is Saturday.
end_conditionnever, after a number of months or years, or an end date
exclusionsDates to skip
date_specific_pause_windows, date_specific_supplementsOverrides for one date

wage_snapshots

ColumnDefaultMeaning
job_idThe job these settings belong to
from_dateStart date. Empty for the baseline, one per job.
hourly_wageHourly wage in the job currency
supplements{ rules: [...] }
overtimeoff, 40 h{ enabled, weeklyThresholdHours, rules: [{ days, appliesOnHolidays, from, to, percent }] }
break_enabled, break_methodon, proportionalAutomatic break
break_threshold_hours, break_deduction_minutes5.5, 30Break threshold and length
tax_enabled, tax_percentageoff, 0Tax estimate

jobs

ColumnMeaning
is_defaultOne active default job per user
currencyFixed when the job is created
payroll_dayDay of the month for monthly paydays, 1 to 31
pay_periodEmpty for calendar month, { type: "monthly", startDay, payoutMonthOffset } or { type: "biweekly", anchorEnd, payoutDelayDays }
half_tax_month11, 12 or empty

payroll_adjustments

ColumnMeaning
amountAmount in the job currency
payout_dateThe payday this amount is added to
job_idThe job. Empty means the default job.
categoryretro_pay, bonus, correction or other
tax_treatmentSee Adjustments under Totals

Source code

  • ios/TidexApp/Services/Payroll/PayrollEngine.swift handles months, tax lookup and overtime.
  • ios/TidexApp/Services/Payroll/PayrollCalculator.swift prices one shift.
  • ios/TidexApp/Services/Payroll/BreakDeduction.swift and ConflictExclusion.swift handle breaks and overlaps.
  • ios/Shared/PayPeriod.swift works out pay periods and paydays.
  • supabase/functions/_shared/payroll/calc.ts is the TypeScript version used by server-side tools.

Examples

Worked cases with the expected result. Use them to check your own numbers or another implementation.

Single shifts

ShiftSettingsPaid hoursBaseSupplementGross
Wed 09:00-14:00185/h, no supplements, no break5.00925.000.00925.00
Wed 17:00-22:00185/h, +22 from 18-21, +45 from 21-24, no break5.00925.00111.001036.00
Wed 22:00-06:00185/h, +45 from 21-24, 30 min proportional break after 5.5 h7.501387.5084.381471.88
Sun 08:00-16:00185/h, +115 all Sunday, 30 min break after 5.5 h7.501387.50862.502250.00
Wed 09:00-14:30185/h, no supplements, 30 min break after 5.5 h5.501017.500.001017.50
Wed 18:00-22:00200/h, +50 % on Wednesday 18-24, no break4.00800.00400.001200.00
Sat 20:00-02:00185/h, +110 Saturday 18-24, +115 all Sunday, no break6.001110.00670.001780.00

Dates used are Wednesday 15, Saturday 18 and Sunday 19 January 2025.

Paydays

Pay periodShiftPaydayShown in app
Calendar month, payroll day 202025-01-152025-02-20Thu 20 Feb
Calendar month, payroll day 172025-01-152025-02-17Fri 14 Feb, because the 17th is a Monday
Monthly from the 20th, paid the same month, payroll day 252025-01-152025-01-25Fri 24 Jan, because the 25th is a Saturday
Every two weeks, block ending 2025-01-12, paid 5 days later2025-01-152025-01-31Fri 31 Jan

Tax, overlaps, overtime and adjustments

CaseInputResult
Half taxGross 1036.00 on 2025-11-15, calendar month, 30 % tax, half-tax month DecemberPayday is in December, so tax is 15 %. Net 880.60.
OverlapWed 09:00-17:00 earns 1480.00. Wed 14:00-22:00 earns 1591.00 with the weekday supplements. No breaks.They overlap 14:00-17:00. Totals keep the 1480.00 shift and cross out the other.
Overtime200/h, 40 h limit, default overtime rules, no breaks. 08:00-18:00 on Monday 2 to Thursday 5 February 2026, then 08:00-12:00 on Friday 6 February.Friday is all overtime at 50 %: base 800.00, premium 400.00, gross 1200.00.
Adjustmentgross_taxable bonus of 1000.00 paid 2025-12-15, 30 % tax, half-tax month DecemberGross 1000.00, net 850.00

Numbers don't match?

Send us the shift times, your wage settings and the amount you expected. We will check the calculation.

Report a calculation issue