This guide provides examples and explanations for using the calculator with its supported operators and functions.
The calculator supports the following arithmetic operators:
+ (Addition)- (Subtraction)* (Multiplication)/ (Division)% (Remainder/Modulo)^ (Exponentiation)2 + 3
Result: 5
10 - 5
Result: 5
4 * 6
Result: 24
15 / 3
Result: 5
17 % 5 Calculate the remainder when 17 is divided by 2.
Result: 2
2 ^ 3
Result: 8
4 ^ 0.5
Result: 2
-2 + 5
Result: 3
2 * (3 + 4) / 2
Result: 7
10 % 3 + 2 ^ 2 - 1
Result: 4
The calculator supports the following comparison operators:
== (Equal to)!= (Not equal to)> (Greater than)< (Less than)>= (Greater than or equal to)<= (Less than or equal to)Note: These operators return True or False.
5 == 5
Result: True
5 != 5
Result: False
10 > 5
Result: True
3 < 7
Result: True
8 >= 8
Result: True
2 <= 5
Result: True
5^(1/7) > 3^(1/5)
Result: True
abs(-10) / 2 == 5
Result: True
(2 + 3) * 2 > 8
Result: True
The calculator supports a variety of functions, as described below.
hcf(...) or gcd(...): Calculates the greatest common divisor of multiple numbers.
hcf(12, 18, 24)
Result: 6
gcd(12, 18)
Result: 6
lcm(...): Calculates the least common multiple of multiple numbers.
lcm(4, 6, 8)
Result: 24
factors(n): Finds the prime factors of a number n. Returns a list of the prime factors.
factors(24)
Result: 2 * 2 * 2 * 3
factors(1)
Result: 1
sqrt(x): Calculates the square root of x.
sqrt(9)
Result: 3
abs(x): Calculates the absolute value of x.
abs(-5)
Result: 5
floor(x): Rounds x down to the nearest integer.
ceil(x): Rounds x up to the nearest integer.
round(x, d): Rounds x to d decimal places.
floor(3.7)
Result: 3
ceil(3.2)
Result: 4
round(3.14159, 2)
Result: 3.14
sqrt(abs(-16)) + 3 * 2
Result: 10
round(3.14159, 2) > 3.14
Result: False
hcf(12, 18) + sqrt(9)
Result: 9
pi(): Returns the value of π (approximately 3.14159).
pi()
Result: 3.14159...
round(pi(), 2)
Result: 3.14
pi() > 3
Result: True
exp(x): Calculates ex.
log(x): Calculates the natural logarithm (base e) of x.
log10(x): Calculates the base-10 logarithm of x.
exp(2)
Result: 7.3890560989307
log(exp(1))
Result: 1
log10(100)
Result: 2
round(log(exp(2)), 2)
Result: 2
exp(1) > 2
Result: True
sqrt(exp(1)) + log10(100)
Result: 3.6487212707001
These functions operate on angles in radians:
sin(x): Sine of xcos(x): Cosine of xtan(x): Tangent of xasin(x): Arcsine (inverse sine) of xacos(x): Arccosine (inverse cosine) of xatan(x): Arctangent (inverse tangent) of xatan2(y, x): Arctangent of y/x, considering the quadrantsin(pi()/2)
Result: 1
cos(0)
Result: 1
tan(pi()/4)
Result: 1
asin(1)
Result: 1.5707963267949
acos(1)
Result: 0
atan(1)
Result: 0.78539816339745
atan2(1,0)
Result: 1.5707963267949
atan2(0,1)
Result: 0
round(sin(pi()/4), 2)
Result: 0.71
sin(pi()/2) == 1
Result: True
sqrt(cos(0)) + log(exp(1))
Result: 2
factors(round(asin(1), 0))
Result: 2
sinh(x): Hyperbolic sine of xcosh(x): Hyperbolic cosine of xtanh(x): Hyperbolic tangent of xasinh(x): Inverse hyperbolic sineacosh(x): Inverse hyperbolic cosineatanh(x): Inverse hyperbolic tangentsinh(1)
Result: 1.1752011936438
cosh(1)
Result: 1.5430806348152
tanh(1)
Result: 0.76159415595576
asinh(1)
Result: 0.88137358701954
acosh(2)
Result: 1.3169578969248
atanh(0.5)
Result: 0.54930614433405
round(sinh(1), 2)
Result: 1.18
cosh(1) > 1.5
Result: True
sqrt(round(tanh(1), 1)) + log(2)
Result: 1.5875743715599
round(acosh(2) * sin(pi()/6), 2)
Result: 0.66
rational(a, b): Simplifies the fraction a/b.
to_rational(x, y=1000): Converts x to a rational number with a maximum denominator y. Defaults to a maximum denominator of 1000 if y isn't specified.
rational(12, 18)
Result: 2/3
to_rational(0.333)
Result: 333/1000
to_rational(0.333, 10)
Result: 1/3
to_rational(0.143, 100)
Result: 1/7
to_rational(0.5) == rational(1, 2)
Result: True
Σ(start, end, term) or sum(start, end, term): Calculates the summation of a term from start to end, using i as the variable. The maximum range is 100,000.
Σ(1, 5, i^2)
Result: 55
Note: 1 + 4 + 9 + 16 + 25 = 55
sum(1, 5, i*2)
Result: 30
Note: 2 + 4 + 6 + 8 + 10) = 30
sum(1, 3, 1/i)
Result: 1.8333333333333
sum(1, 10, sin(i/10))
Result: 5.0138809809837
round(sum(1, 5, i^2 / 10), 2)
Result: 5.5
sum(1, 3, i) > 5
Result: True
sum_prime(a, b): Returns the sum of all prime numbers starting from the a-th prime to the b-th prime. The values of a and b cannot exceed 10,000.
sum_prime(1, 5)
Result: 28
Note: 2 + 3 + 5 + 7 + 11) = 28
sum_prime(3, 7)
Result: 53
Note: 5 + 7 + 11 + 13 + 17 = 53
sum_prime(1, 3) + sum_prime(4, 6)
Result: 41
round(sum_prime(1, 5)/5, 2)
Result: 5.6
factors(sum_prime(1, 3))
Result: 2 * 5
sum_prime(1, 2) > 4 as (2 + 3) > 5
Result: True
The calculator may return an error if you enter an invalid expression. For example:
sqrt(-1)
Result: NAN
log(0)
Result: -INF
log(-1)
Result: NAN
1 / 0
Result: Calculation Error: Syntax Error: Division by zero
sum(1, 100002, i)
Result: Summation Error: The range is too large. Maximum allowed range is 100,000.
sqrt() and log() must be within their valid domains.