Methodology
Last updated:
Editorial principles
- Formula first, copy second. Before publishing a calculator page, the math function is written in TypeScript and covered by unit tests.
- Verifiable source. Every legal constant cites the norm or official site where it was published.
- In-browser calculation. User data is not sent to a server to process.
- Visible disclaimer. Every calculator with legal or tax consequence shows a clear reference-only notice.
Legal sources by country
Ecuador
- Labor Code — basis for 13th salary, 14th salary, vacation, reserve fund.
- Social Security Law and IESS resolutions — personal and employer contribution rates.
- Internal Tax Regime Law — VAT, ISD, withholdings, e-invoicing.
- Ministerial SBU agreement — official minimum wage per year.
Payment gateway fees
- PayPal: merchant fees per region from paypal.com (reviewed at least yearly).
- Stripe: stripe.com/pricing per country.
- MercadoPago: official fee documentation per country.
Automated tests
Each calculator has a calc.test.ts with cases:
- Typical case (normal user).
- Edge case (zero, very large numbers, decimals).
- Officially documented case (when an example is published by the authority).
- Rounding (we verify rounding matches the legal method).
Deploy pipeline runs tests before publishing. If a constant changes and a test breaks, the calculator does not deploy until the expected case is fixed.
Update cycle
- January: annual constant review (SBU, tax brackets, gateway fees).
- Quarterly: exchange rates, international commissions.
- On any bug report: targeted review.
Constant versioning
Constants store their effective year in source:
// src/lib/calculators/ec-iess/calc.ts
export const IESS_RATES_2026 = {
employeeGeneral: 0.0945,
employerGeneral: 0.1115,
reserveFund: 0.0833,
};
This lets us serve a historical rate when a user computes a past period.
Errors and correction
Confirmed formula errors are fixed in under 48 business hours, with a regression test added, and a footer note on the calculator when impact is relevant.