A Tetrahedron is simply a pyramid with a triangular base. It is a solid object with four triangular faces, three on the sides or lateral faces, one on the bottom or the base and four vertices or corners. If the faces are all congruent equilateral triangles, then the tetrahedron is called regular.

The area of Tetrahedron can be found by using the formula :
Area = sqrt(3)*(side*side)
Examples :
Input : side = 3 Output : 15.5885 Input : side = 20 Output : 692.82
C
// C++ Program to Calculate // area of tetrahedron #include<iostream> #include<math.h> using namespace std; //Utility Function double area_of_tetrahedron(int side) { return (sqrt(3)*(side*side)); } //Driver Code int main() { int side=3; cout<< "Area of Tetrahedron =" << area_of_tetrahedron(side); } // This code is contributed by anant321. |
Java
// Java Program to Calculate // area of tetrahedron import java.util.*; import java.lang.*; class GFG { // Utility Function public static double area_of_tetrahedron(int side) { return (Math.sqrt(3) * (side * side)); } // Driver code public static void main(String[] args) { int side = 3; System.out.println("Area of Tetrahedron =" + area_of_tetrahedron(side)); } } // This code is contributed // by Prasad Kshirsagar |
Python3
# Python3 Program to # Calculate area of # tetrahedron import math def area_of_tetrahedron(side): return (math.sqrt(3) * (side * side)); # Driver Code side = 3; print("Area of Tetrahedron = ", round(area_of_tetrahedron(side), 4)); # This code is contributed by mits |
C#
// C# Program to Calculate // area of tetrahedron using System; class GFG { // Utility Function public static double area_of_tetrahedron(int side) { return (Math.Sqrt(3) * (side * side)); } // Driver code static public void Main () { int side = 3; Console.WriteLine("Area of Tetrahedron = " + area_of_tetrahedron(side)); } } // This code is contributed // by akt_mit |
PHP
<?php // PHP Program to Calculate // area of tetrahedron function area_of_tetrahedron($side) { return (sqrt(3) * ($side * $side)); } // Driver Code $side = 3; echo "Area of Tetrahedron = ", area_of_tetrahedron($side); // This code is contributed by aj_36. ?> |
Output :
Area of Tetrahedron =15.5885
The volume of the tetrahedron can be found by using the following formula :
Volume = a3/(6√2)
Examples :
Input : side = 3 Output : 3.18 Input : side = 20 Output : 942.81
C/C++
// CPP program to find the volume of a tetrahedron #include <math.h> #include <stdio.h> // Function to calculate volume double vol_tetra(int side) { double volume = (pow(side, 3) / (6 * sqrt(2))); return volume; } // Driver Code int main() { int side = 3; double vol = vol_tetra(side); printf("%.2f", vol); } |
Java
// Java code to find the volume of a tetrahedron import java.io.*; class Tetrahedron { // Function to calculate volume static double vol_tetra(int side) { double volume = (Math.pow(side, 3) / (6 * Math.sqrt(2))); return volume; } // Driver Code public static void main(String[] args) { int side = 3; double vol = vol_tetra(side); vol = (double)Math.round(vol * 100) / 100; System.out.println(vol); } } |
Python
# Python code to find the volume of a tetrahedron import math def vol_tetra(side): volume = (side ** 3 / (6 * math.sqrt(2))) return round(volume, 2) # Driver Code side = 3vol = vol_tetra(side) print(vol) |
C#
// C# code to find the volume of a tetrahedron using System; class Tetrahedron { // Function to calculate volume static double vol_tetra(int side) { double volume = (Math.Pow(side, 3) / (6 * Math.Sqrt(2))); return volume; } // Driver Code public static void Main() { int side = 3; double vol = vol_tetra(side); vol = (double)Math.Round(vol * 100) / 100; Console.WriteLine(vol); } } // This code is contributed // by vt_m. |
PHP
<?php // PHP program to find the // volume of a tetrahedron // Function to calculate volume function vol_tetra($side) { $volume = (pow($side, 3) / (6 * sqrt(2))); return $volume; } // Driver Code $side = 3; $vol = vol_tetra($side); echo $vol; // This code is contributed by ajit ?> |
Output :
3.18
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
Recommended Posts:
- Java Program for Program to calculate area of a Tetrahedron
- Python Program for Program to calculate area of a Tetrahedron
- Program to calculate area of a Tetrahedron
- Calculate Volume, Curved Surface Area and Total Surface Area Of Cylinder
- Program to find the Volume of an irregular tetrahedron
- Program to calculate Volume and Surface area of Hemisphere
- Calculate Volume and Surface area Of Sphere
- Calculate volume and surface area of a cone
- Calculate volume and surface area of Torus
- Program to calculate volume of Ellipsoid
- Program to calculate volume of Octahedron
- Program for Volume and Surface Area of Cube
- Program for Volume and Surface Area of Cuboid
- Program for Volume and Surface area of Frustum of Cone
- Program to find the Area and Volume of Icosahedron
- Program to find volume and surface area of pentagonal prism
- Program to find Surface Area and Volume of Octagonal Prism
- Calculate Volume of Dodecahedron
- Surface Area and Volume of Hexagonal Prism
- Find maximum volume of a cuboid from the given perimeter and area
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

