4 Function Calculator
A free basic 4 function calculator that adds, subtracts, multiplies and divides, with square root, percent and memory keys. Type or tap a calculation and get the exact answer, every step, a check, and the answer a left-to-right calculator would show.
⚡ 0. Quick Answer
A 4 function calculator is a basic calculator that does four operations: addition (+), subtraction (−), multiplication (×) and division (÷), usually with √, % and memory keys.
Worked example: 125 + 37 × 4 − 18 ÷ 3 = 125 + 148 − 6 = 267. Pressed key by key on a basic calculator that works left to right, the same keys give 210.
Rule of thumb: a basic 4 function calculator does each key at once, so 2 + 3 × 4 shows 20, not 14. Do the × and ÷ parts first, or use the M+ key, to get the textbook answer.
Key Takeaways
- A 4 function calculator has exactly 4 operations: +, −, × and ÷, plus helper keys such as √, %, ± and M+.
- Most basic models work left to right, so 2 + 3 × 4 = 20 on them but 14 with the order of operations.
- Division by 0 has no answer, so every calculator shows E or Error.
- The percent key adds a share of the running total: 250 + 18% = 295.
- College Board allows a 4-function calculator with square root on AP Biology and AP Environmental Science.
📚 1. What Is a 4 Function Calculator?
A 4 function calculator is the simplest kind of electronic calculator. It does the four basic operations of arithmetic: addition, subtraction, multiplication and division. That is where the name comes from. You may also see it written as a 4-function calculator, a four-function calculator or a basic calculator.
Most models add a few helper keys. The √ key takes a square root. The % key works out percentages. The ± key changes the sign. The memory keys (MC, MR, M−, M+) store a number while you work on something else. A 4 function calculator has no powers, no sin or cos, no logs and no graphs. Those belong to scientific and graphing calculators.
Used for: shopping bills, splitting a restaurant bill, sales tax, discounts, checking homework, measuring for DIY jobs, cash counting and simple lab work. A worked one-liner: three items at 4.99, 12.50 and 3.75 plus a 0.89 bag cost 4.99 + 12.50 + 3.75 + 0.89 = 22.13.
Who uses it: primary and middle school students (Grades 3 to 8), students sitting exams that only allow a basic calculator, cashiers, teachers marking work, and anyone who wants a fast answer without menus. College Board lets students bring a 4-function calculator to AP Macroeconomics, AP Microeconomics and AP Business with Personal Finance, and a 4-function calculator with a square root key to AP Biology and AP Environmental Science (policy checked October 2026).
1.1 4 function vs scientific vs graphing calculator
| Feature | 4 function calculator | Scientific calculator | Graphing calculator |
|---|---|---|---|
| Operations | + − × ÷, often √ and % | All of those plus powers, roots, logs, sin, cos, tan | All scientific functions plus graphs and programs |
| Order of 2 + 3 × 4 | Usually left to right: 20 | Order of operations: 14 | Order of operations: 14 |
| Brackets | Usually none | Yes | Yes |
| Screen | 8 to 12 digits, one line | Two lines or natural display | Full graph screen |
| Typical price (USD) | 2 to 10 | 10 to 25 | 90 to 160 |
| Best for | Money, quick sums, basic-calculator exams | Algebra, science, A level and SAT | Functions, calculus, statistics |
| Wins when | Speed and simplicity matter | You need powers or brackets | You need to see a graph |
🧮 2. Enter Your Calculation
Paper tape (history)
Key guide
- × ÷ or type * and /
- √ or type sqrt
- 250 + 18% adds 18% of 250
- ± flips the last number
- M+ / M− add the answer to memory
- MR puts the memory back in
- Enter or = calculates
- 1,250 commas for thousands are fine
Teachers use this to build an answer key: paste a worksheet, press Calculate, then Download Doc gives every answer with its working. Lines that start with # are skipped.
📊 3. Results and Step-by-Step Solution
🧠 4. Understanding Your Answer, In Detail
4.1 What your answer means
___ Solve a problem above.
4.2 Does the calculation order change it?
___ Solve a problem above.
This is the most common surprise with a basic calculator. Cheap 4 function calculators use immediate execution: each operation is carried out the moment you press the next operation key. So 2 + 3 × 4 becomes 5 × 4 = 20. School maths, scientific calculators, Excel, R and Python all follow the order of operations instead, which gives 2 + 12 = 14. Neither calculator is broken. They follow different rules, and the tool shows you both.
4.3 Exact answer or decimal?
___ Solve a problem above.
A fraction becomes a decimal that stops (terminates) only when its bottom number, in lowest terms, has no prime factors except 2 and 5. So 3/8 = 0.375 stops, but 1/3 = 0.333... and 1/7 = 0.142857142857... go on forever. A calculator screen cuts these off, which is why 1 ÷ 3 × 3 can show 0.9999999 on a cheap model. This tool keeps the exact fraction, so it gives exactly 1.
4.4 How to check the answer yourself
___ Solve a problem above.
Every operation has an opposite: + is undone by −, and × is undone by ÷. If 148 ÷ 4 gives back 37, then 37 × 4 = 148 was right. A second quick check is estimation: round each number and work it out in your head. 125 + 37 × 4 − 18 ÷ 3 is close to 120 + 40 × 4 − 6 = 274, so 267 is believable and 2,670 is not.
4.5 Exact arithmetic vs ordinary floating point
___ Solve a problem above.
4.6 What the charts show
Chart 1 shows the result of each step in the order it was done. In left-to-right mode this is the running total a basic calculator holds. Chart 2 shows every number you typed, with negative numbers below the line. Chart 3 compares three ways of working out the same keys: the order of operations, a left-to-right basic calculator, and a typical computer program. Chart 4 counts how many of each operation the calculation needed.
4.7 Special and impossible cases
| Case | Example | Answer | Why |
|---|---|---|---|
| Divide by zero | 45 ÷ 0 | Undefined (E) | No number times 0 gives 45 |
| Zero divided by a number | 0 ÷ 45 | 0 | 0 × 45 = 0, so it works |
| Square root of a negative | √(−9) | Not a real number (E) | Any real number squared is 0 or more |
| Two negatives multiplied | −15 × −2 | 30 | Negative times negative is positive |
| Subtracting a negative | 9 − (−30) | 39 | Taking away a debt adds |
| Answer too long for the screen | 987654321 × 123456789 | 121,932,631,112,635,269 | An 8-digit screen shows E; this tool shows all 18 digits |
4.8 What research says about calculators and these mistakes
Using a calculator does not weaken basic skills when it is part of teaching: a meta-analysis of 54 studies found that students' operational and problem-solving skills improved when calculators were used in both instruction and tests (Ellington, 2003), and an earlier review of 79 studies reached a similar result for most grades (Hembree & Dessart, 1986). The order of operations is a real stumbling block even for adults. In a study of 381 future elementary teachers, many did multiplication before division and addition before subtraction, reading PEMDAS literally instead of working left to right (Glidden, 2008). Division by zero causes similar trouble: some teachers of Grades 4 to 8 did not know it is undefined, and others knew but could not explain why (Quinn et al., 2008). Finally, ordinary computer arithmetic stores decimals in binary, so 0.1 + 0.2 is not exactly 0.3 (Goldberg, 1991). That is why this tool uses exact fractions instead.
4.9 Where this leads next
Once the four operations are automatic, the next topics are fractions and mixed numbers, percentages, averages, and then powers and roots on a scientific calculator. A mean is just addition followed by one division, so the mean calculator is a natural next step.
✍ 5. How to Write the Answer
Five ready-to-copy versions of your answer. They fill in after you press Calculate.
___ Solve a problem above to fill this card.
Conventions
Write one operation per line. Show the × and ÷ lines before the + and − lines. Underline or box the final answer. Markers give method marks for the lines even if the last number slips.
___ Solve a problem above to fill this card.
Conventions
Give money to 2 decimal places. Give a repeating decimal either as a fraction or rounded to the places the question asks for, and say "to 2 d.p." or "to 3 s.f.".
___ Solve a problem above to fill this card.
Conventions
Add the left-to-right wrong answer to the key. It tells you at once which students pressed the keys in order on a basic calculator.
___ Solve a problem above to fill this card.
Conventions
Keep full precision in the working and round only the reported value. Say which rounding you used.
___ Solve a problem above to fill this card.
Conventions
Uses * for times, / for divide and sqrt() for the root, so it pastes cleanly into any text box, Excel cell or code editor.
∑ 6. Formulas Used
These are the rules the 4 function calculator applies, with the worked example 125 + 37 × 4 − 18 ÷ 3 = 267 where it fits.
🔀 7. 4 Function Calculator Flowchart, Step by Step
This flowchart shows how a 4 function calculator problem is worked out step by step with the order of operations. Every box uses the same worked example as the Excel, R, Python and by-hand sections: 125 + 37 × 4 − 18 ÷ 3.
Check any box yourself: the Excel sheet in Section 9, the R script in Section 10, the Python script in Section 11 and the written method in Section 14 all give 267 for this example.
📝 8. How to Use This Calculator
- Type or tap your calculation. Use the keypad, or type into the screen with * for × and / for ÷.
- Or pick a sample problem. The Sample problem box has ten worked examples, from a shopping bill to the viral 6 ÷ 2 × (1 + 2).
- Choose the calculation order. Keep Order of operations for school maths, or pick Left to right to copy a basic calculator.
- Set the decimal places. Choose 2 for money, or 4, 6 or 10 for science and checking.
- Press Calculate or =. The Enter key works too.
- Read the answer box. It shows the exact answer, the decimal, the answer type and a Verified badge.
- Follow the steps. Each step names the rule it used and why it comes in that order.
- Use memory for long jobs. M+ adds the answer to memory, M− takes it away, MR puts it back, MC clears it.
- Paste many problems in Batch mode. One calculation per line, up to 500 lines.
- Download the working. Download Doc saves a text file with every step; Download PDF prints a clean copy.
📈 9. How to Do 4 Function Calculations in Excel
Excel is a 4 function calculator with a grid. It uses + and − as normal, * for × and / for ÷, and it always follows the order of operations. So the worked example gives 267, not the 210 a basic calculator shows when you press the keys in order.
The whole thing in one cell: =125+37*4-18/3 returns 267. With the numbers in A2:A6, =A2+A3*A4-A5/A6 does the same.
9.1 The functions you need
| You want | Excel | Note |
|---|---|---|
| Add, subtract, multiply, divide | + - * / | Start every formula with = |
| Add a whole column | =SUM(A2:A20) | Ignores text and blank cells |
| Multiply a whole column | =PRODUCT(A2:A6) | Blank cells are skipped, not treated as 0 |
| Whole-number division | =QUOTIENT(17,5) | Returns 3, drops the remainder |
| Remainder | =MOD(17,5) | Returns 2. Takes the divisor's sign with negatives |
| Square root | =SQRT(81) | Returns #NUM! for a negative number |
| Percent of a number | =250*18% | Returns 45. Excel reads 18% as 0.18 |
| Add a percent | =250*(1+18%) | Returns 295, the same as 250 + 18% on a calculator |
| Round | =ROUND(1/7,4) | Returns 0.1429. Rounds a 5 away from zero |
| Show as a fraction | Format Cells → Fraction | Displays 0.375 as 3/8 |
9.2 Step by step
1 Type the whole calculation in one cell
Click any cell, type the formula and press Enter. Excel applies × and ÷ before + and −, the same as this tool's default mode.
=125+37*4-18/3Cell A1 shows 267. The formula bar keeps the formula so you can edit it.
2 Put the numbers in cells and refer to them
Cell references let you change one number and see the answer update. This is how a shopping list or a budget works.
=A2+A3*A4-A5/A6With 125, 37, 4, 18, 3 in A2:A6, cell C2 gives 267.
3 Copy a basic calculator with a running total
To see what a left-to-right calculator does, build the running total one key at a time. Each cell uses the cell above it.
=C2*A4=C3-A5The running total goes 162, 648, 630, 210. The last cell is the 210 a basic calculator shows.
4 Add up a bill with SUM and a percent
For the shopping example, SUM adds the column and a second cell adds the tax or tip.
=SUM(A2:A5)=B6*(1+18%)The four items total 22.13. Adding 18% gives 26.1134, which rounds to 26.11.
9.3 The awkward cases
- Long answers lose digits. Excel stores about 15 significant digits. 987654321 × 123456789 shows 1.21933E+17, and even with number format it ends in 000 instead of 269. This tool gives all 18 digits exactly.
- Hidden decimal errors.
=0.1+0.2displays 0.3, but=0.1+0.2-0.3shows 5.55E-17 instead of 0. Wrap money in ROUND before comparing values. - Percent typed as a number. 18 and 18% are different.
=250*18is 4,500;=250*18%is 45. - Text that looks like a number. A number pasted from a web page may be text. SUM skips it silently. Look for green triangles in the cell corner.
9.4 Why Excel might disagree with a calculator, R or Python
| Situation | What happens | Fix |
|---|---|---|
| 2+3*4 on a basic calculator | Basic calculator 20, Excel 14 | Use Excel's answer for school maths, or brackets: =(2+3)*4 for 20 |
=-3^2 | Excel gives 9 (the minus is applied first); R, Python and paper give −9 | Write =-(3^2) or =0-3^2 |
| Rounding 2.5 to a whole number | Excel ROUND gives 3; R and Python round() give 2 (round half to even) | Say which rule you used. This tool rounds half away from zero, like Excel |
=MOD(-7,3) | Excel 2, R 2, Python 2, but C and JavaScript give −1 | Check the sign rule of the language you use |
| 0.1 + 0.2 | Excel shows 0.3 but stores 0.30000000000000004 | ROUND before comparing |
| 250 + 18% typed into Excel | Excel gives 250.18 (it adds 0.18) | Write =250*(1+18%); a calculator's % key does this for you |
9.5 Charting it in Excel
For a running total, select the step labels and the totals and choose Insert → Column chart. Then add the order-of-operations answer as a second series and change it to a line, so you can see where the left-to-right total drifts away. For values against a number scale, use Scatter with Straight Lines, never Line chart, because Line chart spaces the x values evenly whatever they are.
9.6 Excel errors you will probably hit
| Error | Cause | Fix |
|---|---|---|
| #DIV/0! | Dividing by 0 or by an empty cell | =IFERROR(A2/B2,"") or fill the cell |
| #VALUE! | A cell holds text, such as "12 kg" | Keep units in the header, numbers in the cells |
| #NUM! | SQRT of a negative number | Use ABS, or check the sign first |
| #NAME? | A typo in a function name, such as =SUMM | Retype the name; Excel suggests it as you type |
| ######## | The column is too narrow for the answer | Double-click the column edge to widen it |
📈 10. How to Do 4 Function Calculations in R
R follows the order of operations, so 125 + 37 * 4 - 18 / 3 prints 267. The script below also copies a left-to-right basic calculator, prints both answers, checks every step with the opposite operation, and saves one 300 dpi chart.
Rscript four_function.R. Change only the nums and ops lines to use your own calculation. MASS comes with every standard R install.10.1 The complete script
R, base plus MASS, saves four_function_steps.png
# ============================================================
# 4 function calculator: order of operations vs left to right
# StatsUnlock - https://statsunlock.com/4-function-calculator/
# Base R plus MASS (MASS ships with every standard R install).
# ============================================================
# ---- 1. Your calculation (change these two lines) ----------
nums <- c(125, 37, 4, 18, 3)
ops <- c("+", "*", "-", "/")
expr_text <- paste0(nums[1], paste0(" ", ops, " ", nums[-1], collapse = ""))
cat("Calculation:", expr_text, "\n")
# ---- 2. Order of operations (R follows BODMAS / PEMDAS) ----
bodmas <- eval(parse(text = expr_text))
# ---- 3. Left to right, like a basic 4 function calculator --
apply_op <- function(a, op, b) {
switch(op,
"+" = a + b,
"-" = a - b,
"*" = a * b,
"/" = if (b == 0) stop("Division by zero is undefined") else a / b)
}
running <- numeric(length(ops))
acc <- nums[1]
for (i in seq_along(ops)) {
acc <- apply_op(acc, ops[i], nums[i + 1])
running[i] <- acc
}
left_to_right <- acc
# ---- 4. Print the answers -----------------------------------
cat("Order of operations answer:", format(bodmas, big.mark = ","), "\n")
cat("Left-to-right answer :", format(left_to_right, big.mark = ","), "\n")
cat("Exact fraction :", format(MASS::fractions(bodmas)), "\n")
if (bodmas != left_to_right) {
cat("Verdict: the order changes the answer. Use", bodmas, "for school maths.\n")
} else {
cat("Verdict: both orders give the same answer.\n")
}
# ---- 5. Check every step with the opposite operation --------
product <- 37 * 4 # 148
quotient <- 18 / 3 # 6
subtotal <- 125 + product # 273
final <- subtotal - quotient
checks <- c(product / 4 == 37,
quotient * 3 == 18,
subtotal - product == 125,
final + quotient == subtotal)
cat("Inverse checks passed:", sum(checks), "of", length(checks), "\n")
cat("Residual (bodmas - final):", bodmas - final, "\n")
# ---- 6. One 300 dpi figure ----------------------------------
step_names <- c("125 + 37", "x 4", "- 18", "/ 3")
png("four_function_steps.png", width = 7, height = 4.5, units = "in", res = 300)
par(mar = c(5, 5, 4, 1))
bp <- barplot(running, names.arg = step_names, col = "#ea580c", border = NA,
ylim = c(0, max(running) * 1.18), las = 1,
ylab = "Running total", xlab = "Key pressed (left to right)",
main = paste0("Left to right gives ", left_to_right,
", order of operations gives ", bodmas))
text(bp, running, labels = running, pos = 3, font = 2)
abline(h = bodmas, col = "#2563eb", lwd = 3, lty = 2)
legend("topright", legend = c("Basic calculator, left to right",
"Order of operations answer"),
fill = c("#ea580c", NA), border = NA, lty = c(NA, 2), lwd = c(NA, 3),
col = c(NA, "#2563eb"), bty = "n")
invisible(dev.off())
cat("Saved four_function_steps.png\n")Output when run: Order of operations answer: 267. Left-to-right answer: 210. Inverse checks passed: 4 of 4. Residual 0.
10.2 What each part does
| Part | What it does |
|---|---|
| 1. nums, ops | The calculation as numbers and operator symbols. R uses * and /. |
| 2. eval(parse()) | Lets R work out the text with its own order of operations: 267. |
| 3. apply_op loop | Applies each key to the running total, like a basic calculator: 162, 648, 630, 210. |
| 4. MASS::fractions | Prints the answer as an exact fraction, for example 1/7 instead of 0.1428571. |
| 5. checks | Undoes each step: 148 / 4 = 37, 6 * 3 = 18, and so on. |
| 6. png(..., res = 300) | Saves a bar chart of the running total with the correct answer as a dashed line. |
10.3 What the figure shows
Four orange bars show the running total a basic calculator holds after each key: 162, 648, 630 and 210. The dashed blue line marks 267, the order-of-operations answer. The big jump at "x 4" is the moment the two methods split, because the basic calculator multiplies 162 instead of 37.
10.4 Common R problems and fixes
| Problem | Fix |
|---|---|
0.1 + 0.2 == 0.3 is FALSE | Use isTRUE(all.equal(0.1 + 0.2, 0.3)) |
round(2.5) gives 2 | R rounds half to even. For half up use floor(x + 0.5) |
5 / 0 gives Inf, not an error | Test the divisor first, as apply_op does |
| Big products print as 1.219326e+17 | format(x, scientific = FALSE, big.mark = ","), but doubles keep only 15 to 17 digits |
-3^2 is -9 | Correct on paper too; use (-3)^2 for 9 |
| Error: could not find function "fractions" | Call it as MASS::fractions() |
10.5 Useful one-liners
| Task | R |
|---|---|
| Whole-number division and remainder | 17 %/% 5; 17 %% 5 |
| Add a percent | 250 * (1 + 18/100) |
| Running total of a list | cumsum(c(4.99, 12.50, 3.75, 0.89)) |
| Square root | sqrt(81) |
| Round money | round(26.1134, 2) |
| Exact fraction | MASS::fractions(3/8 + 1/4) gives 5/8 |
📈 11. How to Do 4 Function Calculations in Python
Python also follows the order of operations, so 125 + 37 * 4 - 18 / 3 gives 267.0. The script uses fractions.Fraction to keep every answer exact, copies a left-to-right calculator, checks each step and saves a 300 dpi figure.
Install once: pip install matplotlib
11.1 The complete script
Python 3, saves four_function_steps.png
# ============================================================
# 4 function calculator: order of operations vs left to right
# StatsUnlock - https://statsunlock.com/4-function-calculator/
# Needs: pip install matplotlib (fractions is built in)
# ============================================================
from fractions import Fraction
import operator
import matplotlib
matplotlib.use("Agg") # remove this line in Jupyter to see the plot
import matplotlib.pyplot as plt
# ---- 1. Your calculation (change these two lines) ----------
nums = [Fraction(125), Fraction(37), Fraction(4), Fraction(18), Fraction(3)]
ops = ["+", "*", "-", "/"]
OPS = {"+": operator.add, "-": operator.sub,
"*": operator.mul, "/": operator.truediv}
expr_text = str(nums[0]) + "".join(f" {o} {n}" for o, n in zip(ops, nums[1:]))
print("Calculation:", expr_text)
# ---- 2. Order of operations: x and / first, then + and - ----
def bodmas(nums, ops):
vals, pending = [nums[0]], []
for o, n in zip(ops, nums[1:]):
if o in "*/":
if o == "/" and n == 0:
raise ZeroDivisionError("Division by zero is undefined")
vals[-1] = OPS[o](vals[-1], n)
else:
pending.append(o)
vals.append(n)
acc = vals[0]
for o, v in zip(pending, vals[1:]):
acc = OPS[o](acc, v)
return acc
# ---- 3. Left to right, like a basic 4 function calculator --
def left_to_right(nums, ops):
acc, running = nums[0], []
for o, n in zip(ops, nums[1:]):
if o == "/" and n == 0:
raise ZeroDivisionError("Division by zero is undefined")
acc = OPS[o](acc, n)
running.append(acc)
return acc, running
exact = bodmas(nums, ops)
ltr, running = left_to_right(nums, ops)
# ---- 4. Print the answers -----------------------------------
print("Order of operations answer:", exact, "=", float(exact))
print("Left-to-right answer :", ltr)
print("Python's own eval :", eval(expr_text)) # also BODMAS
if exact != ltr:
print(f"Verdict: the order changes the answer. Use {exact} for school maths.")
else:
print("Verdict: both orders give the same answer.")
# ---- 5. Check every step with the opposite operation --------
product, quotient = Fraction(37) * 4, Fraction(18) / 3 # 148 and 6
subtotal = 125 + product # 273
final = subtotal - quotient
checks = [product / 4 == 37, quotient * 3 == 18,
subtotal - product == 125, final + quotient == subtotal]
print(f"Inverse checks passed: {sum(checks)} of {len(checks)}")
print("Residual (exact - final):", exact - final)
print("Floating point trap: 0.1 + 0.2 =", 0.1 + 0.2,
"| exact:", Fraction("0.1") + Fraction("0.2"))
# ---- 6. One 300 dpi figure ----------------------------------
names = ["125 + 37", "x 4", "- 18", "/ 3"]
fig, ax = plt.subplots(figsize=(7, 4.5))
bars = ax.bar(names, [float(v) for v in running], color="#ea580c")
ax.bar_label(bars, labels=[str(v) for v in running], fontweight="bold")
ax.axhline(float(exact), color="#2563eb", lw=3, ls="--",
label=f"Order of operations answer = {exact}")
ax.set_ylabel("Running total")
ax.set_xlabel("Key pressed (left to right)")
ax.set_title(f"Left to right gives {ltr}, order of operations gives {exact}")
ax.set_ylim(0, float(max(running)) * 1.18)
ax.legend(loc="upper right", frameon=False)
fig.savefig("four_function_steps.png", dpi=300, bbox_inches="tight")
print("Saved four_function_steps.png")Output when run: Order of operations answer: 267. Left-to-right answer: 210. Inverse checks passed: 4 of 4. Floating point trap: 0.1 + 0.2 = 0.30000000000000004, exact 3/10.
11.2 What each part does
| Part | What it does |
|---|---|
| Fraction(125) | Stores numbers as exact fractions, so 1/3 stays 1/3 and 0.1 + 0.2 is exactly 3/10. |
| bodmas() | Two passes: first every * and /, then every + and −, left to right. |
| left_to_right() | Applies each key to the running total, like a basic calculator. |
| eval(expr_text) | Python's own answer, as a float, for comparison. |
| checks | Undoes every step with the opposite operation. |
| fig.savefig(dpi=300) | Saves the bar chart with the correct answer as a dashed line. |
Python traps: ^ is not a power in Python, it is bitwise XOR, so 3 ^ 2 is 1 (use 3 ** 2). 7 / 2 is 3.5 but 7 // 2 is 3. round(2.5) is 2, because Python rounds half to even. 0.1 + 0.2 == 0.3 is False.
11.3 What the figure shows
The same chart as the R version: the running total of a basic calculator (162, 648, 630, 210) as orange bars and the order-of-operations answer, 267, as a dashed blue line.
11.4 Common Python problems and fixes
| Problem | Fix |
|---|---|
| ZeroDivisionError | Check the divisor before dividing, or catch it with try / except |
| Answer shows 22.130000000000003 | Use Fraction("4.99") or decimal.Decimal("4.99") for money |
Fraction(0.1) gives a huge fraction | Pass a string: Fraction("0.1") gives 1/10 |
| No window appears | Delete the matplotlib.use("Agg") line and add plt.show() |
| math.sqrt(-9) raises ValueError | Correct: it has no real root. Use cmath.sqrt for 3j |
11.5 Useful one-liners
| Task | Python |
|---|---|
| Whole-number division and remainder | divmod(17, 5) gives (3, 2) |
| Add a percent | 250 * (1 + 18 / 100) |
| Running total | list(itertools.accumulate([4.99, 12.50, 3.75, 0.89])) |
| Exact fraction | Fraction(3, 8) + Fraction(1, 4) gives 5/8 |
| Money rounding, half up | Decimal("26.1134").quantize(Decimal("0.01"), ROUND_HALF_UP) |
Run it in a terminal with python four_function.py, in Jupyter, or in Google Colab.
📋 12. Reference Tables
12.1 Order of operations: the names around the world
| Name | Stands for | Used in |
|---|---|---|
| PEMDAS | Parentheses, Exponents, Multiplication and Division, Addition and Subtraction | United States |
| BODMAS | Brackets, Orders (powers), Division and Multiplication, Addition and Subtraction | India, UK, Pakistan, Nigeria, Australia |
| BIDMAS | Brackets, Indices, Division and Multiplication, Addition and Subtraction | England (GCSE) |
| BEDMAS | Brackets, Exponents, Division and Multiplication, Addition and Subtraction | Canada, New Zealand |
| GEMDAS | Grouping symbols, Exponents, then the same as PEMDAS | Some US and Philippine schools |
How to use this table: all five names mean the same rule. M and D have equal rank and go left to right, and so do A and S. PEMDAS does not mean "multiply before you divide".
12.2 Fraction, decimal and percent equivalents
| Fraction | Decimal | Percent | Type |
|---|---|---|---|
| 1/2 | 0.5 | 50% | Terminating |
| 1/3 | 0.333... | 33.33% | Repeating |
| 2/3 | 0.666... | 66.67% | Repeating |
| 1/4 | 0.25 | 25% | Terminating |
| 3/4 | 0.75 | 75% | Terminating |
| 1/5 | 0.2 | 20% | Terminating |
| 1/6 | 0.1666... | 16.67% | Repeating |
| 1/7 | 0.142857... | 14.29% | Repeating, 6-digit cycle |
| 1/8 | 0.125 | 12.5% | Terminating |
| 3/8 | 0.375 | 37.5% | Terminating |
| 1/9 | 0.111... | 11.11% | Repeating |
| 1/10 | 0.1 | 10% | Terminating |
| 1/12 | 0.08333... | 8.33% | Repeating |
How to use this table: to turn any fraction into a decimal on a 4 function calculator, divide the top by the bottom. To turn a decimal into a percent, multiply by 100.
12.3 Perfect squares and their square roots
| n | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| n × n | 1 | 4 | 9 | 16 | 25 | 36 | 49 | 64 | 81 | 100 | 121 | 144 | 169 | 196 | 225 |
How to use this table: if the number under √ is in the bottom row, the root is exact (√144 = 12). Any other whole number gives an endless decimal, such as √2 ≈ 1.4142.
12.4 Calculator keys and what they do
| Key | Name | What it does |
|---|---|---|
| + − × ÷ | The four functions | Add, subtract, multiply, divide |
| = | Equals | Finishes the calculation and shows the answer |
| √ | Square root | Finds the number that times itself gives the display |
| % | Percent | Works out a percentage of the number before it |
| ± or +/− | Change sign | Turns 5 into −5 and back |
| C or AC | Clear (all clear) | Wipes the whole calculation |
| CE | Clear entry | Wipes only the last number typed |
| M+ / M− | Memory plus / minus | Adds the display to memory, or takes it away |
| MR / MC | Memory recall / clear | Shows the memory, or sets it back to 0 |
| MRC | Recall and clear | On many models: press once to recall, twice to clear |
| GT | Grand total | Adds up every answer since the last clear |
How to use this table: key labels differ between brands. If a key is not listed, check the leaflet that came with the calculator.
12.5 Sign rules
| Operation | Rule | Example |
|---|---|---|
| Positive × or ÷ positive | Positive | 6 × 3 = 18 |
| Negative × or ÷ negative | Positive | −15 × −2 = 30 |
| Positive and negative, × or ÷ | Negative | −18 ÷ 3 = −6 |
| Subtracting a negative | Same as adding | 9 − (−30) = 39 |
| Adding a negative | Same as subtracting | 10 + (−4) = 6 |
12.6 What the percent key does
| You type | This tool gives | Meaning | Everyday use |
|---|---|---|---|
| 250 × 18% | 45 | 18% of 250 | The size of a tip or tax |
| 250 + 18% | 295 | 250 plus 18% of 250 | Price plus tax, bill plus tip |
| 80 − 15% | 68 | 80 minus 15% of 80 | Sale price after a discount |
| 45 ÷ 18% | 250 | 45 is 18% of what? | Finding the original amount |
| 18% | 0.18 | 18 ÷ 100 | Turning a percent into a decimal |
How to use this table: physical calculators from different brands disagree on some percent key sequences. Test yours with 200 + 10%: if it shows 220, it works like this tool.
12.7 AP exams that allow a 4-function calculator
| AP exam | Calculators allowed |
|---|---|
| Macroeconomics, Microeconomics, Business with Personal Finance | 4-function only |
| Biology, Environmental Science | 4-function with square root, or a nongraphing scientific calculator |
| Chemistry | Allowed, but not recommended |
| Physics 1, Physics 2, Physics C | 4-function, scientific or graphing |
| Computer Science A and Principles | None, unless an approved accommodation |
Source: College Board AP calculator policy, checked 17 October 2026. Policies change each year, so check again before exam day.
12.8 Divisibility rules (check a division before you press =)
| Divides by | Rule | Example |
|---|---|---|
| 2 | Last digit is even | 148 |
| 3 | Digit sum divides by 3 | 18: 1 + 8 = 9 |
| 4 | Last two digits divide by 4 | 148: 48 ÷ 4 = 12 |
| 5 | Ends in 0 or 5 | 125 |
| 6 | Divides by 2 and by 3 | 18 |
| 8 | Last three digits divide by 8 | 1,000 |
| 9 | Digit sum divides by 9 | 729: 7 + 2 + 9 = 18 |
| 10 | Ends in 0 | 250 |
📈 13. Example Results
Eight worked examples, each checked with the calculator above. Copy any calculation into Section 2 to see every step.
Order of operations homework
The example used all through this page.
Work out 125 + 37 × 4 − 18 ÷ 3.
| Step | Working | Value |
|---|---|---|
| 1 | 37 × 4 | 148 |
| 2 | 18 ÷ 3 | 6 |
| 3 | 125 + 148 | 273 |
| 4 | 273 − 6 | 267 |
What it means: the answer is 267. A basic calculator pressed key by key shows 210 because it adds 125 + 37 before multiplying.
How to write it: 125 + 37 × 4 − 18 ÷ 3 = 125 + 148 − 6 = 267.
A shopping bill
Adding prices exactly, to the cent.
Bread 4.99, cheese 12.50, fruit 3.75 and a bag 0.89.
| Item | Price | Running total |
|---|---|---|
| Bread | 4.99 | 4.99 |
| Cheese | 12.50 | 17.49 |
| Fruit | 3.75 | 21.24 |
| Bag | 0.89 | 22.13 |
What it means: the bill is 22.13. Exact decimal arithmetic matters for money, where a stray 0.000000000000003 can break a comparison in a spreadsheet.
How to write it: Total = 4.99 + 12.50 + 3.75 + 0.89 = 22.13.
A restaurant bill plus tip, split four ways
The percent key and one division.
A bill of 250 with an 18% tip, shared by 4 friends.
| Step | Keys | Value |
|---|---|---|
| Tip | 250 × 18% | 45 |
| Total | 250 + 18% | 295 |
| Each person | 295 ÷ 4 | 73.75 |
What it means: each friend pays 73.75. Typing 250 + 18% gives the total in one go.
How to write it: (250 + 18% of 250) ÷ 4 = 295 ÷ 4 = 73.75 each.
Adding cups of flour
Fractions on a calculator with no fraction key.
A recipe needs 3/8 cup and then 1/4 cup of flour. How much in total?
| Step | Keys | Value |
|---|---|---|
| 3/8 | 3 ÷ 8 | 0.375 |
| 1/4 | 1 ÷ 4 | 0.25 |
| Total | 0.375 + 0.25 | 0.625 = 5/8 |
What it means: the total is 5/8 cup. Typed in one line on a left-to-right calculator, 3 ÷ 8 + 1 ÷ 4 gives 0.34375, which is wrong. Use the memory key or brackets.
How to write it: 3/8 + 1/4 = 3/8 + 2/8 = 5/8 = 0.625 cup.
When the screen runs out of digits
An 8-digit display shows E. This tool does not.
Work out 987654321 × 123456789.
| Where | Shows |
|---|---|
| This tool | 121,932,631,112,635,269 |
| Excel | 121,932,631,112,635,000 (15 digits kept) |
| 8-digit basic calculator | E (overflow) |
What it means: the exact product has 18 digits. A basic calculator cannot hold it, and Excel quietly changes the last three digits to 000.
How to write it: 987654321 × 123456789 = 121,932,631,112,635,269 ≈ 1.22 × 1017.
Dividing by zero
Why the screen says E.
Work out 45 ÷ 0.
| Divisor | 45 ÷ divisor |
|---|---|
| 1 | 45 |
| 0.1 | 450 |
| 0.01 | 4,500 |
| 0.001 | 45,000 |
| 0 | no answer |
What it means: 45 ÷ 0 is undefined. If it equalled some number q, then q × 0 would be 45, but anything times 0 is 0.
How to write it: 45 ÷ 0 is undefined (no real answer).
Why 1 ÷ 3 × 3 can show 0.9999999
The screen cuts off a decimal that never ends.
Work out 1 ÷ 7, then 1 ÷ 3 × 3.
| Calculation | This tool | 8-digit basic calculator |
|---|---|---|
| 1 ÷ 7 | 1/7 = 0.142857 | 0.1428571 |
| 1 ÷ 3 × 3 | 1 | 0.9999999 |
What it means: 1/7 never ends, so any decimal on a screen is rounded or cut. Keeping fractions exact, as this tool does, gives 1 ÷ 3 × 3 = 1 exactly.
How to write it: 1 ÷ 7 = 1/7 ≈ 0.1429 (4 d.p.).
The viral one: 6 ÷ 2 × (1 + 2)
Answer 9, not 1.
Work out 6 ÷ 2 × (1 + 2).
| Step | Working | Value |
|---|---|---|
| Bracket | 1 + 2 | 3 |
| Left to right | 6 ÷ 2 | 3 |
| Then | 3 × 3 | 9 |
What it means: the answer is 9. People who get 1 multiply 2 × 3 before dividing, which breaks the left-to-right rule for × and ÷.
How to write it: 6 ÷ 2 × (1 + 2) = 6 ÷ 2 × 3 = 3 × 3 = 9.
✏️ 14. How to Do 4 Function Calculations by Hand, Step by Step
This is the pen and paper method a teacher expects to see, worked on the same example as Sections 7, 9, 10 and 11: 125 + 37 × 4 − 18 ÷ 3.
14.1 The written method
- Copy the calculation and look for brackets. There are none, so start with × and ÷.
- Underline every × and ÷. Here: 37 × 4 and 18 ÷ 3.
- Multiply 37 × 4 in a column. 7 × 4 = 28: write 8, carry 2. 3 × 4 = 12, plus the carried 2 is 14. Write 14. The answer is 148.
- Divide 18 ÷ 3. 3 × 6 = 18, so 18 ÷ 3 = 6.
- Rewrite the line with the new numbers. 125 + 148 − 6.
- Add 125 + 148 in a column. 5 + 8 = 13: write 3, carry 1. 2 + 4 + 1 = 7. 1 + 1 = 2. The answer is 273.
- Subtract 273 − 6. 3 − 6 does not work, so borrow: 13 − 6 = 7, and the 7 tens become 6 tens. The answer is 267.
- Estimate to check. 120 + 40 × 4 − 6 = 274, close to 267, so the size is right.
- Check with opposite operations. 267 + 6 = 273, 273 − 148 = 125, 148 ÷ 4 = 37, 6 × 3 = 18. All check.
14.2 On a real calculator
| Calculator | Keys | What you see |
|---|---|---|
| Basic 4 function (most pocket and desk models) | 125 + 37 × 4 − 18 ÷ 3 = | 210 (wrong for school maths: left to right) |
| Basic 4 function, memory method | MC 37 × 4 = M+ 18 ÷ 3 = M− 125 M+ MR | 267 |
| Basic 4 function, reordered | 37 × 4 + 125 =, write down 273, then 18 ÷ 3 =, then 273 − 6 = | 267 |
| Casio fx-991EX (ClassWiz) or fx-82MS | 125 + 37 × 4 − 18 ÷ 3 = | 267 (follows the order of operations) |
| TI-84 Plus CE | 125 + 37 × 4 − 18 ÷ 3 ENTER | 267 |
Most basic 4 function calculators use immediate execution, but some newer models follow the order of operations. Test yours with 2 + 3 × 4: if it shows 20 it works left to right, if it shows 14 it follows BODMAS. Memory key labels differ (some use MRC: press once to recall, twice to clear), so check the leaflet for your model.
14.3 Practice problems with answers
1. 48 + 27
75
2. 365 − 189
176
3. 24 × 15
360
4. 1000 ÷ 8
125
5. 12 + 6 × 3 (trap)
30. Left to right gives 54, which is wrong for school maths.
6. 100 − 36 ÷ 4 × 2
82. 36 ÷ 4 = 9, 9 × 2 = 18, 100 − 18 = 82.
7. 7.5 × 0.4
3
8. 80 − 15% (sale price)
68. 15% of 80 is 12.
9. 2 ÷ 3 + 1 ÷ 6
5/6 ≈ 0.8333
10. 9 ÷ (5 − 5)
Undefined. The bracket is 0, and you cannot divide by 0.
14.4 Mistakes that lose marks
- Typing a long calculation into a basic calculator and trusting the left-to-right answer.
- Doing × before ÷ because M comes before D in PEMDAS. They have equal rank: go left to right.
- Rounding in the middle of the working. Keep full figures and round only the final answer.
- Losing a minus sign: −15 × −2 is +30, not −30.
- Reading 0.9999999 as a different answer from 1. It is the screen cutting off 1/3 × 3.
- Skipping the estimate. A misplaced decimal point (26.7 or 2,670) is easy to spot with a rough check.
🎯 15. When Should You Use a 4 Function Calculator?
Use a 4 function calculator when the job needs only +, −, ×, ÷, √ or %, such as a shopping bill, a tip, a budget or an exam that bans scientific calculators. Switch to a scientific calculator for powers, logs or trig, to a graphing calculator for graphs, and to a spreadsheet for long columns of numbers.
Use a 4 function calculator when
- The job is only +, −, ×, ÷, √ or %.
- You are adding a bill, a budget or a till.
- Your exam allows only a basic calculator.
- You want big keys and no menus.
- You are checking homework one operation at a time.
Use something else when
- You need powers, logs, sin or cos: use a scientific calculator.
- You need to see a graph: use a graphing calculator.
- You have a column of 50 numbers: use a spreadsheet.
- You need exact fractions: use a fraction or mixed number calculator.
- You need a mean or median: use a statistics calculator.
15.1 Four real examples
| Task | Best tool | Why |
|---|---|---|
| Add a grocery receipt | 4 function calculator | Only addition, and the GT or M+ key keeps the total |
| Chi-square value in AP Biology | 4 function with √ | Only −, ×, ÷ and squaring by multiplying are needed |
| Compound interest over 10 years | Scientific calculator | Needs a power key, (1.05)10 |
| Class marks for 30 students | Spreadsheet | SUM and AVERAGE across a whole column |
15.2 Decision tree
- Does the problem need a power, log, sin, cos or tan? Yes → scientific calculator. No → go on.
- Do you need to see a graph? Yes → graphing calculator. No → go on.
- Are there more than about 20 numbers? Yes → spreadsheet or Batch mode above. No → go on.
- Does the calculation mix + or − with × or ÷? Yes → use this tool in Order of operations mode, or the memory method on a basic calculator. No → any 4 function calculator is fine.
🔧 16. Why Is My Calculator Answer Wrong? Common Mistakes and Fixes
Most wrong calculator answers come from the order of the keys, not from the calculator. A basic model works left to right, so 2 + 3 × 4 shows 20 instead of 14. The other usual causes are a lost minus sign, rounding too early, an old value left in memory, and a percent key that works differently from the one you expect.
My calculator and my textbook give different answers
Cause: your calculator works left to right; the textbook uses the order of operations. Fix: do the × and ÷ parts first, or use the memory method in Section 14.2.
The screen shows E or Error
Cause: division by 0, the square root of a negative number, or an answer with too many digits for the screen. Fix: check the divisor and the sign, or use this tool, which shows every digit.
I got 0.9999999 instead of 1
Cause: a repeating decimal such as 1/3 was cut off by the screen. Fix: round the final answer, or do the multiplication before the division (1 × 3 ÷ 3).
The % key gives a strange number
Cause: brands handle the % key differently. Fix: work percents out the long way: 18% of 250 is 250 × 18 ÷ 100 = 45.
My answer is off by a minus sign
Cause: the − key was used instead of ±, or a negative times a negative was given a minus. Fix: use the sign rules in Table 12.5 and put negative numbers in brackets.
The tool says "Two operators in a row"
Cause: something like 5 + × 3 was typed. Fix: delete one of the operators. A minus sign straight after × or ÷ is fine: 15 × −2.
The tool says "A 4 function calculator has no power key"
Cause: the ^ sign was typed. Fix: write 32 as 3 × 3, or use a scientific calculator for larger powers.
Memory gives the wrong total
Cause: an old value was still in memory. Fix: press MC (or MRC twice) before you start, and look for the small M on the screen.
Excel shows #DIV/0! or ########
Cause: dividing by an empty or zero cell, or a column that is too narrow. Fix: see Table 9.6.
Money totals end in 0.000000000003
Cause: binary floating point in spreadsheets and code. Fix: round to 2 decimal places, or use exact tools such as this calculator, Python's Fraction or Decimal.
⚖ 17. Assumptions and Limitations
Assumptions
- Real numbers only. The square root of a negative number is reported as not real. To check: the number under √ must be 0 or more. If you need complex numbers (3i), use a scientific calculator with a complex mode.
- Typed decimals are exact. 0.333 is read as 333/1000, not 1/3. To check: type 1 ÷ 3 when you mean one third.
- The order of operations is BODMAS / PEMDAS by default. Switch to Left to right to copy a basic calculator. Implied multiplication, as in 2(3), is treated as an ordinary × with the same rank as ÷.
- The percent key follows the common rule. a + b% adds b% of a. If your teacher or your calculator uses a different rule, work the percent out separately.
- Rounding is half away from zero, the same as Excel ROUND. R and Python round a final 5 to the nearest even digit instead.
Limitations
- No powers, logs or trig. That is by design for a 4 function calculator. Use a scientific calculator.
- Square roots of non-square numbers are rounded to 40 decimal places, so they show a Rounded badge instead of an exact form.
- Very long calculations slow down. Numbers with thousands of digits work, but keep a single line under about 2,000 characters.
- Batch mode reads up to 500 lines and only the first column of a CSV file.
- Percent key behaviour varies by brand. This tool cannot copy every model; Table 12.6 lists its rules.
🏁 18. Conclusion
A 4 function calculator does four things, addition, subtraction, multiplication and division, and that covers most everyday maths. The one rule that trips people up is the order: many basic calculators work left to right, while school maths does × and ÷ before + and −. This tool gives you both answers, keeps every number exact, and checks each step.
What the answer is
___ Solve a problem above.
What it tells you
___ Solve a problem above.
Watch out for
___ Solve a problem above.
Next steps
___ Solve a problem above.
For money, round to 2 decimal places at the very end. For fractions, keep the fraction until the last step. For long calculations on a real basic calculator, use the memory keys. And whatever you use, estimate first, so a wrong answer looks wrong straight away. That habit is the best partner for any 4 function calculator.
❓ 19. Frequently Asked Questions
What is a 4 function calculator?
A 4 function calculator is a basic calculator that adds, subtracts, multiplies and divides. Most models also have square root, percent, sign change and memory keys, but no powers, logs, trig or graphs. It is the calculator most people mean when they say "a basic calculator", and it is the type many schools and exams ask for.
What are the 4 functions of a calculator?
The four functions are addition (+), subtraction (−), multiplication (×) and division (÷). Every other operation on a basic calculator, such as percent, is built from these four. Subtraction undoes addition and division undoes multiplication, which is how this page checks every answer.
What is a basic 4 function calculator?
A basic 4 function calculator is the simplest pocket or desk calculator, with a one-line screen of 8 to 12 digits and the four arithmetic keys. It is the type allowed in exams that ban scientific and graphing calculators. Typical models cost 2 to 10 US dollars and run on a solar cell or a button battery.
Is a scientific calculator a 4 function calculator?
No. A scientific calculator can do the four functions, but it also has powers, roots, logs and trig keys. An exam that asks for a 4 function calculator will not accept a scientific one. The reverse is not true either: a basic calculator cannot work out 210 or sin 30 without many extra key presses.
Does a 4 function calculator have a square root?
Most do. The √ key is common on basic models, and College Board specifically allows a 4-function calculator with square root on AP Biology and AP Environmental Science. Powers, cube roots and logs are not included, so for those you need a scientific calculator.
Does a 4 function calculator follow the order of operations?
Usually not. Most basic models do each operation as soon as you press the next key, so they work left to right. This tool lets you choose either rule and shows both answers. Test yours with 2 + 3 × 4: it shows 20 if it works left to right and 14 if it follows BODMAS.
Why does my calculator say 2 + 3 × 4 = 20?
Because it works left to right: it adds 2 + 3 = 5 first, then multiplies by 4. With the order of operations the answer is 14, because 3 × 4 = 12 is done first. Nothing is broken. Press 3 × 4 first, then add 2, or use the M+ key, to get the textbook answer of 14.
Can you use a 4 function calculator on the AP Biology exam?
Yes. College Board allows a 4-function calculator with square root, or a nongraphing scientific calculator, on AP Biology and AP Environmental Science. Check the current policy before exam day. A 4-function calculator without a square root key is also allowed, but the root key helps with standard deviation and chi-square work.
What does the % key do on a 4 function calculator?
The % key works out a percentage of the number before it. On this tool 250 × 18% = 45, 250 + 18% = 295 and 80 − 15% = 68. Some brands handle the key differently, so test yours with 200 + 10%.
How do you use the memory keys on a calculator?
M+ adds the number on the screen to memory, M− subtracts it, MR shows what is stored, and MC clears it. Clear the memory before you start so an old value does not spoil the total. For example, 37 × 4 M+, 18 ÷ 3 M−, 125 M+, then MR shows 267.
What does E mean on a calculator?
E means error. It appears when you divide by zero, take the square root of a negative number, or get an answer with more digits than the screen can show. Press C or AC to clear it, then check the step that caused it before you try again.
Why can't you divide by zero?
Because no number works. If 45 ÷ 0 equalled some number q, then q × 0 would have to be 45, but any number times 0 is 0. So the answer is undefined. Dividing a number by smaller and smaller numbers gives bigger and bigger answers, with no limit at 0.
How do you do fractions on a 4 function calculator?
Divide the top number by the bottom number. 3/8 is 3 ÷ 8 = 0.375. To add fractions, turn each into a decimal, store them with M+, then press MR, or type the whole line into this tool, which keeps the exact fraction.
How do you do exponents on a 4 function calculator?
Multiply the number by itself: 34 is 3 × 3 × 3 × 3 = 81. On many basic models, pressing 3 × = squares the number and each further = multiplies by 3 again. Check your model with 3 × = = before you rely on it in a test.
What is the difference between C and CE on a calculator?
C (or AC) clears the whole calculation. CE clears only the last number you typed, so you can fix a typing slip without starting again. For example, if you typed 125 + 73 by mistake, press CE and type 37 to carry on without losing the 125. Some models use one key that clears the entry on the first press and everything on the second.
How do I do 4 function calculations in Excel?
Start the cell with = and use + − * and /, for example =125+37*4-18/3, which gives 267. Excel follows the order of operations. Section 9 shows SUM, PRODUCT, QUOTIENT, MOD and percents.
How do I do the four operations in R?
Type them directly: 125 + 37 * 4 - 18 / 3 prints 267. Use %/% for whole-number division and %% for the remainder. Section 10 has a full script with a chart. R also follows the order of operations, and MASS::fractions() shows an answer such as 0.625 as 5/8.
How do I do the four operations in Python?
Use + - * and /, so 125 + 37 * 4 - 18 / 3 gives 267.0. Use // for whole-number division, % for the remainder, and fractions.Fraction for exact answers. Never use ^ for powers. Python also follows the order of operations, so it agrees with this tool's default mode.
How do I use a Casio scientific calculator as a 4 function calculator?
Type the calculation as written and press =. Models such as the Casio fx-991EX and fx-82MS follow the order of operations, so 125 + 37 × 4 − 18 ÷ 3 = shows 267. A basic Casio pocket calculator, by contrast, usually works left to right and shows 210 for the same keys.
Is this 4 function calculator free and accurate?
Yes. It is free, needs no sign-up, and uses exact fraction arithmetic, so 0.1 + 0.2 gives exactly 0.3 and large products keep every digit. Every step is checked with the opposite operation. It also shows what a left-to-right calculator would give, so you can see why two answers differ.
📑 20. Cite This Tool
StatsUnlock Team. (2026). 4 function calculator [Interactive calculator]. StatsUnlock. https://statsunlock.com/4-function-calculator/@misc{statsunlock_4function_2026, title={4 Function Calculator}, author={{StatsUnlock Team}}, year={2026}, note={Interactive calculator}, url={https://statsunlock.com/4-function-calculator/}}Arithmetic was checked with the StatsUnlock 4 function calculator (2026), which uses exact fraction arithmetic and the order of operations.🔗 21. Related Tools
Turn a decimal answer into a mixed number, or add and subtract mixed numbers exactly.
Open the tool →List every factor of a number, the quick way to check a division before you do it.
Open the tool →Solve a proportion such as 3 : 8 = x : 24 with steps.
Open the tool →Add a list and divide by how many there are, with the working shown.
Open the tool →Find the middle value of a list, the average that ignores extreme numbers.
Open the tool →Find the value that appears most often in a list.
Open the tool →Length times width for rooms and floors, an everyday multiplication job.
Open the tool →Work out missing angles with addition and subtraction from 180 and 360.
Open the tool →📖 22. Glossary of Terms
| Term | Plain-English meaning |
|---|---|
| BODMAS / PEMDAS | Memory aids for the order of operations: brackets, then powers, then × and ÷, then + and −. |
| Chain calculation | A calculation done one key after another, each step using the last answer. |
| Difference | The answer to a subtraction. |
| Dividend | The number being divided. In 18 ÷ 3, it is 18. |
| Divisor | The number you divide by. In 18 ÷ 3, it is 3. It must not be 0. |
| Estimation | A quick rounded calculation in your head, used to check that an answer is the right size. |
| Exact answer | The true value, kept as a whole number or fraction with no rounding. |
| Floating point | The way computers store decimals in binary, which makes 0.1 + 0.2 slightly different from 0.3. |
| Immediate execution | How a basic calculator works: each operation is done as soon as the next key is pressed. |
| Inverse operation | The operation that undoes another: − undoes +, ÷ undoes ×. |
| Memory (M) | A store inside the calculator for one number, used with M+, M−, MR and MC. |
| Operand | A number that an operation works on. In 37 × 4, the operands are 37 and 4. |
| Order of operations | The agreed rule for which part of a calculation to do first. |
| Overflow | An answer too long for the screen, shown as E on a basic calculator. |
| Percent | Out of 100. 18% means 18 ÷ 100 = 0.18. |
| Product | The answer to a multiplication. |
| Quotient | The answer to a division. |
| Repeating decimal | A decimal with a block of digits that repeats forever, such as 1/7 = 0.142857142857... |
| Square root | The number that times itself gives the original number. √81 = 9. |
| Sum | The answer to an addition. |
| Terminating decimal | A decimal that stops, such as 3/8 = 0.375. |
| Undefined | Having no answer at all, as with any number divided by 0. |
📚 23. References
Peer-reviewed research behind this 4 function calculator: calculator use in schools, the order of operations, division by zero, percent, exact versus floating-point arithmetic, and the history of the square root.
- Bofferding, L. (2014). Negative integer understanding: Characterizing first graders' mental models. Journal for Research in Mathematics Education, 45(2), 194–245. https://doi.org/10.5951/jresematheduc.45.2.0194
- Close, S., Oldham, E., Shiel, G., Dooley, T., & O'Leary, M. (2012). Effects of calculators on mathematics achievement and attitudes of ninth-grade students. The Journal of Educational Research, 105(6), 377–390. https://doi.org/10.1080/00220671.2011.629857
- Crespo, S., & Nicol, C. (2006). Challenging preservice teachers' mathematical understanding: The case of division by zero. School Science and Mathematics, 106(2), 84–97. https://doi.org/10.1111/j.1949-8594.2006.tb18138.x
- Dimmel, J. K., & Pandiscio, E. A. (2020). When it's on zero, the lines become parallel: Preservice elementary teachers' diagrammatic encounters with division by zero. The Journal of Mathematical Behavior, 58, 100760. https://doi.org/10.1016/j.jmathb.2020.100760
- Ellington, A. J. (2003). A meta-analysis of the effects of calculators on students' achievement and attitude levels in precollege mathematics classes. Journal for Research in Mathematics Education, 34(5), 433–463. https://doi.org/10.2307/30034795
- Ellington, A. J. (2006). The effects of non-CAS graphing calculators on student achievement and attitude levels in mathematics: A meta-analysis. School Science and Mathematics, 106(1), 16–26. https://doi.org/10.1111/j.1949-8594.2006.tb18067.x
- Fowler, D., & Robson, E. (1998). Square root approximations in Old Babylonian mathematics: YBC 7289 in context. Historia Mathematica, 25(4), 366–378. https://doi.org/10.1006/hmat.1998.2209
- Glidden, P. L. (2008). Prospective elementary teachers' understanding of order of operations. School Science and Mathematics, 108(4), 130–136. https://doi.org/10.1111/j.1949-8594.2008.tb17830.x
- Goldberg, D. (1991). What every computer scientist should know about floating-point arithmetic. ACM Computing Surveys, 23(1), 5–48. https://doi.org/10.1145/103162.103163
- Gunnarsson, R., Sönnerhed, W. W., & Hernell, B. (2016). Does it help to use mathematically superfluous brackets when teaching the rules for the order of operations? Educational Studies in Mathematics, 92(1), 91–105. https://doi.org/10.1007/s10649-015-9667-2
- Hembree, R., & Dessart, D. J. (1986). Effects of hand-held calculators in precollege mathematics education: A meta-analysis. Journal for Research in Mathematics Education, 17(2), 83–99. https://doi.org/10.2307/749255
- Higham, N. J. (1993). The accuracy of floating point summation. SIAM Journal on Scientific Computing, 14(4), 783–799. https://doi.org/10.1137/0914050
- Kahan, W. (1965). Pracniques: Further remarks on reducing truncation errors. Communications of the ACM, 8(1), 40. https://doi.org/10.1145/363707.363723
- Kieran, C. (1981). Concepts associated with the equality symbol. Educational Studies in Mathematics, 12(3), 317–326. https://doi.org/10.1007/BF00311062
- Parker, M., & Leinhardt, G. (1995). Percent: A privileged proportion. Review of Educational Research, 65(4), 421–481. https://doi.org/10.3102/00346543065004421
- Quinn, R. J., Lamberg, T. D., & Perrin, J. R. (2008). Teacher perceptions of division by zero. The Clearing House, 81(3), 101–104. https://doi.org/10.3200/TCHS.81.3.101-104
- Reys, R. E., Rybolt, J. F., Bestgen, B. J., & Wyatt, J. W. (1982). Processes used by good computational estimators. Journal for Research in Mathematics Education, 13(3), 183–201. https://doi.org/10.2307/748555
- Rittle-Johnson, B., Siegler, R. S., & Alibali, M. W. (2001). Developing conceptual understanding and procedural skill in mathematics: An iterative process. Journal of Educational Psychology, 93(2), 346–362. https://doi.org/10.1037/0022-0663.93.2.346
- Siegler, R. S., & Booth, J. L. (2004). Development of numerical estimation in young children. Child Development, 75(2), 428–444. https://doi.org/10.1111/j.1467-8624.2004.00684.x
- Young, J. (2017). Technology-enhanced mathematics instruction: A second-order meta-analysis of 30 years of research. Educational Research Review, 22, 19–33. https://doi.org/10.1016/j.edurev.2017.07.001
