Methodology and sources
This page explains how every tool on PayCalculus works, where its reference data comes from, and how the results are kept correct. Each tool page also prints its own formula and a worked example you can follow line by line.
Principles
- Standard formulas only. The tools use the formulas found in banking, accounting and textbook practice. There are no invented shortcuts.
- Show the working. The formula and a worked example appear on every tool page, so any figure can be checked by hand or in a spreadsheet.
- Exact money. Amounts are held as whole minor units, such as cents, pence or paise, so totals do not drift through small floating point errors.
- Round once, at the end. Results are worked out at full precision and rounded half up to the number of decimals the currency uses. Documents are the exception: each line is rounded first and the subtotal adds the rounded lines, so the printed figures add up when a client checks them.
- Dates on every page. Each tool page shows the date it was last updated and the date its method was last checked.
- No hidden country assumptions. The general tools use the tax rate you enter. The rate buttons on the VAT and GST calculator are shortcuts for common percentages, not a statement of any country's current rate. Only the UK salary tools apply a country's rules, and each of their pages names the tax year and the gov.uk sources.
Formulas by tool
- Invoice generator, quote and estimate maker, receipt maker and purchase order generator: each line is quantity x unit price, rounded to the smallest unit. The subtotal adds the rounded lines. A discount comes off before tax, and each tax line is the taxable amount x its own rate. A deposit on a quote is a share of the total with tax included.
- Payslip generator: gross pay is the sum of the earning lines and net pay is gross pay minus the sum of the deduction lines. Each deduction is an amount taken from your payroll. Employer contributions are listed apart and are not taken from net pay.
- Loan and EMI calculator: EMI = P x r x (1 + r)^n / ((1 + r)^n - 1), with interest charged on the reducing balance. The last payment is adjusted so the balance finishes at exactly 0.
- Compound interest and savings calculator: A = P x (1 + r / n)^(n x t) for the starting sum, plus the future value of the regular deposits, made at the end or the start of each period.
- Profit margin and markup calculator: margin = profit / selling price, markup = profit / cost, and the price for a target margin = cost / (1 - margin).
- Break even calculator: break even units = fixed costs / (price - variable cost per unit), rounded up to a whole unit. Break even revenue is worked out from the exact, unrounded units.
- Hourly and freelance rate calculator: hourly rate = (target income + expenses) / (1 - tax reserve) / billable hours, where billable hours = weeks worked x hours per week x billable share.
- Salary converter: yearly pay = the amount x the periods in a year (12 months, the paid weeks, days per week x paid weeks, or hours per week x paid weeks). Each other period divides that yearly pay back down, and every line is rounded once from the exact figure. The tax line is the pay x the flat rate you type.
- UK salary calculator: income tax, National Insurance, student loans and pension are worked out on a whole tax year with the published HMRC rates, then divided into months, weeks and days. Tax is the taxable income in each band x the band rate, and each band, NI line and loan is rounded once.
- Take home pay calculator: the same yearly working, shown as take home a month first. The marginal rate reruns it with 100 pounds more gross, and the gross needed for a monthly target is found by halving a range from 0 to 10,000,000 pounds until it reaches the target to the penny.
- UK income tax calculator: taxable income is gross less a net pay or salary sacrifice pension and the allowance in the tax code, spread over the three bands (six in Scotland). The band rows are rounded once each and add up to the total, and a second run with last year's rates gives the comparison.
- UK salary after tax pages: one page for each whole thousand pounds of salary, worked through the same yearly method as the UK salary calculator with the standard tax code, no student loan and no pension. Each page then runs the same salary again with the default auto enrolment pension, with the Scottish bands and with last year's rates, and every figure it prints comes from those runs.
- VAT and GST calculator: to add tax, gross = net x (1 + rate). To take it out, net = gross / (1 + rate), and the tax is the remainder, so net and tax always add back to the total.
- Currency converter: converted amount = amount x rate. Between two currencies other than the US dollar, the rate is a cross rate, the rate of the second divided by the rate of the first.
Reference data and sources
- Exchange rates. The converter uses mid market rates against the US dollar from the free, open access feed of ExchangeRate-API. A daily job saves them as a file on this site, and the converter page prints the date of that file. If the file cannot be loaded, the page uses a copy shipped with the site and says so.
- Tax rates. Outside the UK salary tools, no country's tax rate is stored or applied for you, and every tool that charges tax uses the rate you type.
- Formula references. Each tool page lists the public pages its method was checked against, with the date of that check.
- UK tax rates. The UK salary tools take income tax bands, National Insurance, student loan and pension thresholds from versioned rates files kept in this site's code, one per tax year, each figure cited to a gov.uk or gov.scot page. The files are read when the site is built and written into the page itself, so the calculators make no network request for them. Each page shows the tax year and the date the rates were last checked.
Testing
The worked example on each tool page is part of an automated test suite. When a calculator or a document layout changes, the tests must reproduce every example to the last cent before the change is published.
Corrections
If a figure looks wrong, send the inputs you used through the contact page. Every report is checked. A confirmed error is fixed and the page's last updated date moves forward.
Limits
The calculators do not know your lender's fees, your bank's exchange margin, the reduced tax rates in your country or your personal circumstances. They give a correct answer to the inputs entered. Whether those inputs fit a real situation is a question for the lender, the bank or a qualified adviser.