Skip to main content

Numeric Input Math

Type a math expression into any numeric field and Unreal Engine calculates the result for you.

Published Updated |
Variables
Loading...

Numeric inputs within Unreal Engine accept and automatically calculate simple mathematical equations when you commit the value.

For example, typing 100/4 into an integer variable will result in 25. No need to pull out calculators or do napkin math.

This works in Details panel properties and in the default values of Blueprint pins.

Which operators can I use?

OperatorExampleResult
+90+10100
-100-2575
*16*464
/100/425
%10%31
^2^8256
( )(2+3)*1050

Can I do math on the current value?

Yes. Start the entry with +=, -=, *=, or /= to apply the math to the field’s current value. For example, typing +=50 into a field that holds 100 gives you 150, which is handy for nudging a value without retyping it.

Frequently asked questions

Why did my integer field round down?

Integer fields drop the fractional part of the result, so typing 10/4 into an integer gives you 2 rather than 3.

What happens if I divide by zero?

The field rejects the entry and keeps its old value. The same goes for modulo zero.

Is the result limited?

Yes, the result is clamped to the limits of the field’s type.

Unreal Directive is free and ad-free.

If it saved you time, you can help keep it that way.

Donate