cbrt - Linux


cbrt calculates the cube root of a floating-point number. It’s particularly useful in mathematical computations, where finding the cube root is a common task.


cbrt NUM


  • NUM: The number for which to find the cube root. Must be a floating-point value.




  • To calculate the cube root of 8:
cbrt 8


  • To find the cube root of -27:
cbrt -27


  • To assign the cube root of 64 to a variable:
VAR=$(cbrt 64)

Common Issues

  • Invalid input: The input must be a valid floating-point number. Non-numeric or negative values (for cube root calculation) will result in an error.

  • Accuracy limitations: Cube root calculations using floating-point numbers may result in a precision loss compared to exact mathematical calculations.


cbrt can be combined with other commands for various tasks:

  • Mathematical operations: Calculate cube roots in complex mathematical expressions using pipes or scripts.
  • Data analysis: Extract cube roots from data sets for statistical analysis or data visualization.
  • Geometric calculations: Compute cube roots in geometric formulas, such as finding the radius of a sphere given its volume.

Related Commands

  • sqrt: Calculates the square root.
  • pow: Raises a number to a specified power.
  • awk: Supports mathematical operations and allows for cube root calculations using the sqrt(num) ^ 3 syntax.