How to get customer group Id and group name in Magento?

It is very simple in Magento. Please follow my below code.

$login = Mage::getSingleton( ‘customer/session’ )->isLoggedIn(); //Check if User is Logged In
if($login)
{
$groupId = Mage::getSingleton(‘customer/session’)->getCustomerGroupId(); //Get Customers Group ID

echo “Group ID ::  “.$groupId;

$group = Mage::getModel(‘customer/customer_group’)->load($groupId);
echo “Group Name :: “.$group->getName();

}

Hope it will help you.