How to Raise a Number to a Power in Golang 2022-07-02 46 words - 1 min read If you need to raise a number to a power in Golang, then you can use the math.Pow function: 1 2 3 4 5 6 7 8 9 package main import ( "math" ) func main() { var exponent, base float64 output := math.Pow(base, exponent) }