I’d add to Omar’s statement advance mode. So when you hit g then x to constraint on x you can then hit equal(=) to enter advanced mode. From there you can type 5mm for millimeters. You can combine like 1m 2cm for 2 meter and 2 centimeters. You can do math like 1ft+7in. To add 7 inches to 1 foot. You can also use 1’+7″ instead. If your units is set to metric the feet and inches will get converted. If your units are set to imperial then meter and centimeters will get converted. If you are using a formula that needs π then just type pi not sure if it has to be lowercase or not but I always type it lowercase. Note: if you don’t constraint on a single axis for advanced mode you will have to Tab to switch to different axis. So X by default. Tab for y tab again for z and tab again to go back to x. You can see what you have entered in the viewport’s header.