Free tool

Complete Calculator

Basic, scientific, programmer and financial. Safe expression parser, binary/hex conversion and financial calculations. 100% in the browser.

0

How to use the calculator?

  1. 1

    Choose the mode in the sidebar

    On the left (or at the top on mobile) you will find the four modes: Basic for everyday operations, Scientific for trigonometry and logarithms, Programmer for working with number bases and bitwise operations, and Financial for investment and loan calculations. Click any mode to instantly switch the keypad and display.

  2. 2

    Scientific mode — write complete expressions

    In scientific mode you can chain functions and operators directly: write sin(45)+sqrt(2)*PI and press = to get the result. The parser evaluates the full expression respecting operator precedence (brackets, powers, multiplication/division, addition/subtraction). Use the DEG/RAD toggle to choose whether trigonometric function angles are in degrees or radians.

  3. 3

    Programmer mode — convert between bases and operate bits

    The display shows the current number in DEC, HEX, OCT and BIN simultaneously. Select the active base with the DEC/HEX/OCT/BIN tabs and type in that base; the others update instantly. Use AND, OR, XOR, NOT for bitwise operations, and << / >> for shifts. Click any bit in the visualiser to toggle it individually. Switch between 8, 16 and 32 bits with the corner selectors.

  4. 4

    Financial mode — fill in the fields and read the result

    Four sub-calculators: Compound interest (principal, rate, years and frequency), Mortgage/Loan (amount, annual rate and term in years), VAT/Tax (price plus or minus the percentage, bidirectional with preconfigured 4%, 10% and 21% rates) and ROI (initial investment and final value). All results are calculated in real time as you fill in the fields.

  5. 5

    Programmer mode — IPv4 network panel

    Press 🌐 in the top bar of Programmer mode to expand the subnet calculator, IP binary viewer and CIDR↔Netmask converter. In the 'IPv4 Subnet' tab enter an IP address and adjust the CIDR with the slider to instantly get the network, broadcast, first and last usable IP, number of hosts, netmask and wildcard. In 'IP Binary' convert any IP to its binary and hexadecimal representation per octet. In 'CIDR↔Netmask' convert in both directions or use the predefined shortcuts.

Frequently asked questions

Why don't you use eval() to evaluate expressions?

eval() executes arbitrary JavaScript code in the user's browser, making it an XSS attack vector if user input is processed. This calculator uses a custom recursive descent parser: a tokeniser that converts the string into tokens (numbers, operators, functions, constants) and a syntax analyser that respects the standard grammar of mathematical expressions. It is completely safe, predictable and does not interpret any code beyond mathematics.

What is the difference between Basic and Scientific mode?

Basic mode provides standard arithmetic operations (addition, subtraction, multiplication, division, percentage and sign change) with a simplified 4×5 keypad. Scientific mode adds direct and inverse trigonometric functions (sin, cos, tan, asin, acos, atan), logarithms (log₁₀, ln, log₂), roots (√, ³√), powers (xⁿ), factorial (n!), absolute value (|x|), reciprocal (1/x) and the constants π and e, as well as support for nested brackets and a degrees/radians toggle.

How does base conversion work in Programmer mode?

Programmer mode works internally with 32-bit unsigned integers. When you change the base, the same numerical value is represented in the new base: DEC (base 10), HEX (base 16, digits 0-9 and A-F), OCT (base 8, digits 0-7) and BIN (base 2). AND, OR, XOR and NOT operations work at the bit level on all 32 bits of the value. The width selector (8/16/32 bits) limits the value range and applies the corresponding mask in NOT.

How is the monthly mortgage payment calculated?

The calculator uses the standard French amortisation formula: M = P × [r(1+r)ⁿ] / [(1+r)ⁿ - 1], where P is the loan amount, r is the monthly interest rate (annual rate / 12 / 100) and n is the number of months (years × 12). The result includes the monthly payment, the total paid over the life of the loan and the total interest paid.

Is the data entered in Financial mode sent to any server?

No. Absolutely all calculations are performed locally in your browser with pure JavaScript. No data — amounts, rates or results — leaves your device. Reloading the page clears all information. There are no cookies, no analytics linked to calculations and no user registration of any kind.

How do I calculate the network address and broadcast with the calculator?

In Programmer mode, press the 🌐 button and select the 'IPv4 Subnet' tab. Enter the IP address and adjust the CIDR with the slider. You will instantly get: network address, broadcast, first and last usable IP, number of hosts, netmask and wildcard mask. For example, 192.168.1.0/24 → network 192.168.1.0, broadcast 192.168.1.255, 254 usable hosts.

Embed the calculator in your site

You can embed this calculator in any website with an iframe. It is free, works offline and requires no additional JavaScript on your page.

Iframe (direct integration):

<iframe src="https://miguelacm.es/embed/calculator" width="100%" height="700" style="border:none;border-radius:12px;" title="Complete Calculator — miguelacm.es" loading="lazy"></iframe>

Link with attribution:

<a href="https://miguelacm.es/es/tools/calculator" target="_blank" rel="noopener">Free online calculator by MACM</a>

Built by

Miguel Ángel Colorado

Full-Stack Developer · CTO @ Securiyu

I build 100% client-side web tools — no sign-up, no servers, no cost.

Contact me