Mathematical calculation commands
Java mod listed for Minecraft 1.19. Downloads from the MC Java Mods app on Android.
⬇ Download on ModrinthMinecraft Math Lib
A mod that provides some math functions that can be used in-game more easily. (suitable for datapack makers)
Futures
Commands
Math
Usage:
/math <name1> <objective1> <operation> <name2> <objective2>
perform operations.
The following operations are currently supported:
- Plus (
+) - Minus (
-) - Multiplication (
"*") - Division (
"/") - Max (
max) - Min (
min) - Average (
middle) =cos/=sin/=tan/=sqrtPlease note: these will change the value of the first provided scoreboard- Mod (
"%") - Power (
"^")
The output result will be output in the chat bar. If the value of the scoreboard has not been modified, you can store it with execute store result. If the value is modified this value will remain constant. Note that all operations are rounded up, as the Minecraft scoreboard doesn't support decimals!
Random
Usage:
/random <min> <max> or /random <min_name> <min_objective> <max_name> <max_objective>
Get a random integer between the minimum and maximum values.
Support Languages
- English
- Simplified Chinese
Translations are welcome: https://github.com/wifi-left/Minecraft-Math-Lib/tree/master/src/main/resources/assets/mathlib/lang
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.19, 1.19.1, 1.19.2
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Modrinth — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
- Ships as MinecraftMathLib-1.0.1.jar — drop this file into the mods folder
- Download size: 16 KB
- Download link checked 27 Sept 2026 — working
These come from our own check of the pack file, not from the source page.