Calculate

Calculate is a Mac OS X widget for evaluating math expressions. Any JavaScript expression can be evaluated, and variables and functions are persistently stored. Works on both Mac OS X 10.4 (Tiger) and 10.5 (Leopard).

Calculate
Download Calculate-1.1.3.zip

Comments from Calculate lovers

“I’ve tried a bunch of other calculator widgets but yours blows me away. Clean, simple, very ‘macintosh-esque’. I love it!” — Jay M

“I love the calculate widget! ... I am a math teacher and I have just started using your widget! It is great!” — Ebbe V

“It’s the formula calc widget with the richest functionality I have found.” — Magnus C

“Defintely the nicest widget calculator I’ve used.” — Gabe G

Arithmetic Operations

-a Change the sign of a
~a Bitwise NOT a
++a Add 1 to a (before using a)
a++ Add 1 to a (after using a)
--a Subtract 1 from a (before using a)
a-- Subtract 1 from a (after using a)
a * b Multiply a by b
a / b Divide a by b
a % b Find the remainder of division of a by b
a + b Add a and b
a - b Subtract b from a
a & bBitwise a AND b
a | b Bitwise a OR b
a ^ b Bitwise a XOR b
a << bShift a by b bits to the left (padding with zeros)
a >> b Shift a by b bits to the right (copying the sign bit)
a >>> b Shift a by b bits to the right (padding with zeros)

Functions

Basic functions

abs(a) The absolute value of a
ceil(a) Integer closest to a and not less than a
floor(a) Integer closest to and not greater than a
max(a,b) The maximum of a and b
min(a,b) The minimum of a and b
pow(a,b) a to the power b
random() Pseudorandom number in the range 0 to 1
round(a) Integer closest to a
sqrt(a) Square root of a

Log functions

exp(a) Exponent of a
ln(a) Log of a base e
log2(a) Log of a base 2
log10(a) Log of a base 10

Trig functions

sin(a) Sine of a
cos(a) Cosine of a
tan(a) Tangent of a
csc(a) Cosecant of a
sec(a) Secant of a
cot(a) Cotangent of a
asin(a) Arc sine of a
acos(a) Arc cosine of a
atan(a) Arc tangent of a
atan2(a,b) Arc tangent of a/b
acsc(a) Arc cosecant of a
asec(a) Arc secant of a
acot(a) Arc cotangent of a

Hyperbolic functions

sinh(a) Hyperbolic sine of a
cosh(a) Hyperbolic cosine of a
tanh(a) Hyperbolic tangent of a
csch(a) Hyperbolic cosecant of a
sech(a) Hyperbolic secant of a
coth(a) Hyperbolic cotangent of a
asinh(a) Hyperbolic arc sine of a
acosh(a) Hyperbolic arc cosine of a
atanh(a) Hyperbolic arc tangent of a
acsch(a) Hyperbolic arc cosecant of a
asech(a) Hyperbolic arc secant of a
acoth(a) Hyperbolic arc cotangent of a

More functions

Looking for more functions? Copy and paste these functions into Calculate, or write your own custom functions. Custom functions are automatically saved.

toDegrees = function (r) { return r * 180 / pi; }
toRadians = function (d) { return d * pi / 180; }
fibonacci = function (n) { var a = 0; var b = 1; for (var i = 1; i <= n; i++) { var c = a + b; a = b; b = c; } return a; }
factorial = function (n) { var result = 1; for (var i = 2; i <= n; i++) { result *= i; } return result; }
sign = function (x) { return x < 0 ? -1 : x > 0 ? 1 : 0; }
toHex = function (x) { return x.toString(16); }
toBin = function (x) { return x.toString(2); }
toUnicode = function (ch) { return ch.charCodeAt(0); }

Changes in version 1.1.3

Changes in version 1.1.2

Changes in version 1.1.1

Changes in version 1.1.0

Changes in version 1.0.1