<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="index, follow">
<title>Age Calculator | Goosingle</title>
<meta name="description" content="Calculate your exact age in years, months, and days instantly with our free online Age Calculator. Fast, simple, and mobile-friendly age finder by Goosingle.">
<meta property="og:title" content="Age Calculator | Goosingle">
<meta property="og:description" content="Calculate your exact age in years, months, and days instantly with our free online Age Calculator. Fast, simple, and mobile-friendly age finder by Goosingle.">
<meta property="og:url" content="<?php $protocol = !empty($_SERVER['HTTPS']) ? 'https' : 'http'; echo $protocol . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>">

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Age Calculator | Goosingle">
<meta name="twitter:description" content="Calculate your exact age in years, months, and days instantly with our free online Age Calculator. Fast, simple, and mobile-friendly age finder by Goosingle.">

<link rel="canonical" href="<?php $protocol = !empty($_SERVER['HTTPS']) ? 'https' : 'http'; echo $protocol . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>" />

<link rel="icon" type="image/png" href="/images/16x16.png">
<link rel="icon" type="image/png" href="/images/32x32.png">
<link rel="icon" type="image/png" href="/images/36x36.png">
<link rel="icon" type="image/png" href="/images/48x48.png">
<link rel="icon" type="image/png" href="/images/57x57.png">
<link rel="icon" type="image/png" href="/images/60x60.png">
<link rel="icon" type="image/png" href="/images/64x64.png">
<link rel="icon" type="image/png" href="/images/72x72.png">
<link rel="icon" type="image/png" href="/images/76x76.png">
<link rel="icon" type="image/png" href="/images/96x96.png">
<link rel="icon" type="image/png" href="/images/120x120.png">
<link rel="icon" type="image/png" href="/images/128x128.png">
<link rel="icon" type="image/png" href="/images/144x144.png">
<link rel="icon" type="image/png" href="/images/150x150.png">
<link rel="icon" type="image/png" href="/images/152x152.png">
<link rel="icon" type="image/png" href="/images/180x180.png">
<link rel="icon" type="image/png" href="/images/192x192.png">
<link rel="icon" type="image/png" href="/images/256x256.png">
<link rel="icon" type="image/png" href="/images/310x310.png">
<link rel="icon" type="image/png" href="/images/512x512.png">
<link rel="icon" type="image/png" href="/images/favicon.ico">
<link rel="manifest" href="/images/manifest.json">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/codemirror.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/theme/monokai.min.css">
<link rel="stylesheet" href="https://toolscrip.com/t/css/navstyle.css">
<link rel="stylesheet" href="https://toolscrip.com/t/css/responsiveads.css">
<?php
include 'config.php';

// Define the title
$headerTitle = "Age Calculator";

// Stop words list
$stopWords = ['to', 'and', 'convert', 'converter', 'To', 'And', 'Convert', 'Converter', 'into', 'Files', 'Online', 'Tool', 'Free'];

// Split the title into words
$keywords = explode(' ', $headerTitle);

// Filter stop words
$filteredKeywords = array_diff($keywords, $stopWords);

// Prepare query only if keywords remain
$resultsHtml = "";
if (!empty($filteredKeywords)) {
    $sql = "SELECT * FROM tools WHERE ";
    $conditions = [];
    $params = [];

    foreach ($filteredKeywords as $index => $word) {
        $conditions[] = "title LIKE :word$index";
        $params[":word$index"] = "%" . $word . "%";
    }

    $sql .= implode(" OR ", $conditions) . " ORDER BY title ASC LIMIT 10";

    $stmt = $conn->prepare($sql);
    $stmt->execute($params);
    $results = $stmt->fetchAll(PDO::FETCH_ASSOC);

    if ($results) {
        // Related heading phrases
        $headingOptions = [
            "Best Alternatives to",
            "Top Picks Like",
            "Similar Tools to",
            "Other Great Tools Like",
            "Recommended Picks for",
            "Top Alternatives for",
            "Popular Tools Like"
        ];

        // Pick one randomly
        $randomHeading = $headingOptions[array_rand($headingOptions)];
        $resultsHtml .= "<h2 class='alt-heading'>$randomHeading<br><span class='highlight-title'>$headerTitle</span></h2>";
        $resultsHtml .= "<ul class='alt-list'>";
        $displayedTitles = [];

        foreach ($results as $row) {
            if (in_array($row['title'], $displayedTitles)) continue;

            $resultsHtml .= "<li class='alt-item'>
    <a href='" . htmlspecialchars($row['url']) . "' target='_blank' class='alt-link'>
        " . htmlspecialchars($row['title']) . "
    </a>
    <span class='arrow-icon'><i class=\"fas fa-arrow-right\"></i></span>
</li>";

            $displayedTitles[] = $row['title'];
        }

        $resultsHtml .= "</ul>";
    } else {
        $resultsHtml .= "<p>No results found for: <strong>$headerTitle</strong></p>";
    }
}

// Close connection
$conn = null;
?>
<link rel="stylesheet" href="https://toolscrip.com/t/css/leftsidebarlist.css">
<link rel="stylesheet" href="https://toolscrip.com/t/css/contentcontainer.css">
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "name": "Goosingle Age Calculator",
  "url": "https://toolscrip.com/t/agecalculator/",
  "description": "Instantly calculate your age in years, months, and days using Goosingle’s free and mobile-friendly online Age Calculator.",
  "publisher": {
    "@type": "Organization",
    "name": "Goosingle",
    "logo": {
      "@type": "ImageObject",
      "url": "https://toolscrip.com/t/Logo.png"
    }
  },
  "image": "https://toolscrip.com/t/Logo.png"
}
</script>

  <style>

h1 {
  font-size: 40px;
  font-weight: 800;
  color: #222;
  background: linear-gradient(90deg, #0d6efd, #20c997);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin-bottom: 30px;
  letter-spacing: 1.5px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  border-bottom: 3px solid #0d6efd;
}


.container {
  max-width: 960px;
  margin: 0 auto;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: background 0.3s;
}

.second-button {
  padding: 10px 16px;
  margin-right: 8px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.second-button
{
  background: #4CAF50;
  color: #fff;
  border: none;
}

.second-button:hover {
  background: #45a049;
}

.header-section {
  margin: 30px auto;
  background: #ffffff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
  text-align: center;
  font-family: 'Poppins', sans-serif;
}

.header-section h1 {
  font-size: 30px;
  font-weight: 800;
  color: #222;
  background: linear-gradient(90deg, #0d6efd, #20c997);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin-bottom: 30px;
  letter-spacing: 1.5px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  border-bottom: 3px solid #0d6efd;
  display: inline-block;
}

.header-section p {
  font-size: 18px;
  line-height: 1.8;
  text-align: left;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
  word-spacing: 1px;
  font-weight: 400;
  font-family: "Segoe UI", Roboto, sans-serif;
}
  </style>
  <style>
    .age-calculator-wrapper {
      max-width: 420px;
      margin: 60px auto;
      background: #fff;
      padding: 30px;
      border-radius: 14px;
      box-shadow: 0 4px 14px rgba(0,0,0,0.15);
      text-align: center;
      font-family: sans-serif;
    }

    .age-calculator-title {
      font-size: 32px;
      font-weight: 800;
      margin-bottom: 20px;
      color: #333;
    }

    .input-label {
      display: block;
      margin: 16px 0 8px;
      font-weight: 600;
      font-size: 16px;
    }

    .input-field {
      width: 100%;
      padding: 12px;
      border: 1px solid #ccc;
      border-radius: 8px;
      font-size: 16px;
    }

    .calculate-btn {
      margin-top: 24px;
      background: #0d6efd;
      color: #fff;
      padding: 14px 20px;
      border: none;
      border-radius: 10px;
      font-size: 17px;
      cursor: pointer;
      transition: background 0.3s ease;
    }

    .calculate-btn:hover {
      background: #0247b3;
    }

    .result {
      margin-top: 26px;
      font-size: 18px;
      color: #2e7d32;
      font-weight: 600;
    }
  </style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
<script src="https://toolscrip.com/index/socialshare.js"></script>
</head>
<body>

  <nav class="bodynav">
    <div class="logo">
  <picture>
    <source srcset="https://toolscrip.com/Logo.webp 1x, https://toolscrip.com/Logo@2x.webp 2x" type="image/webp">
    <img src="https://toolscrip.com/Logo.png" alt="Goosingle Logo" loading="lazy">
  </picture>
    </div>
<ul class="nav-links" id="navLinks">
    <li><a href="https://toolscrip.com/"><i class="fas fa-home"></i> Home</a></li>
    <li><a href="https://toolscrip.com/about-us.html"><i class="fas fa-info-circle"></i> About Us</a></li>
    <li><a href="https://toolscrip.com/contact"><i class="fas fa-envelope"></i> Contact</a></li>
    <li><a href="https://toolscrip.com/privacy-policy.html"><i class="fas fa-user-shield"></i> Privacy Policy</a></li>
</ul>

    <div class="hamburger" id="hamburger">
      <div></div>
      <div></div>
      <div></div>
    </div>
  </nav>

  <div class="bodycontainer">
    <!-- Left Sidebar -->
    <div class="left-sidebar">

<div style="display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin: 30px 0;">

  <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4534557501951570" crossorigin="anonymous"></script>
  <!-- 230x240h -->
  <ins class="adsbygoogle responsiveads"
    style="display:inline-block;width:230px;height:240px"
    data-ad-client="ca-pub-4534557501951570"
    data-ad-slot="2123643762"></ins>
  <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
  </script>
</div>

<?php if (!empty($resultsHtml)) { echo $resultsHtml; } ?>


<div style="display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin: 30px 0;">
  <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4534557501951570" crossorigin="anonymous"></script>
  <!-- 160x600 -->
  <ins class="adsbygoogle responsiveads"
    style="display:inline-block;width:160px;height:600px"
    data-ad-client="ca-pub-4534557501951570"
    data-ad-slot="8080400221"></ins>
  <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
  </script>

</div>

</div>

    <!-- Main Content Area -->
    <div class="main-content">
<div class="search-bar">
  <form action="https://toolscrip.com/" method="get" style="display: flex; width: 100%; max-width: 600px;">
    <input type="text" id="searchInput" name="search" placeholder="Search tools..." autocomplete="off">
	<button type="submit" class="search-button">Search</button>
  </form>
</div>
  <div class="container">
  <h1>Age Calculator</h1>

<div class="age-calculator-wrapper">
    <h1 class="age-calculator-title"><i class="fas fa-user-clock"></i> Age Calculator</h1>

    <label for="dob" class="input-label">Select Your Date of Birth:</label>
    <input type="date" id="dob" class="input-field">

    <button class="calculate-btn" onclick="calculateAge()">
      <i class="fas fa-hourglass-start"></i> Calculate Age
    </button>

    <div id="result" class="result"></div>
</div>
</div>

<div class="content-container">
  <h2><i class="fas fa-user-clock"></i> Online Age Calculator for Everyone</h2>
  <p>Looking for a fast, simple, and accurate way to calculate your exact age? You’ve found it! Our online <strong>Age Calculator</strong> is an easy-to-use tool designed to instantly calculate your age in years, months, and days from your date of birth. Whether you’re curious about your age or planning a birthday celebration — this tool makes it effortless.</p>

  <h3><i class="fas fa-heart"></i> Why Use an Age Calculator?</h3>
  <ul>
    <li><i class="fas fa-check-circle"></i> Instantly find your exact age in years, months, and days.</li>
    <li><i class="fas fa-check-circle"></i> Perfect for planning birthdays, anniversaries, and milestones.</li>
    <li><i class="fas fa-check-circle"></i> No complicated forms — just select your birth date and calculate.</li>
    <li><i class="fas fa-check-circle"></i> Works on mobiles, tablets, and desktops for quick checks anytime.</li>
  </ul>

  <h3><i class="fas fa-birthday-cake"></i> Most Popular Age Calculations</h3>
  <ul>
    <li><i class="fas fa-arrow-right"></i> How old am I today?</li>
    <li><i class="fas fa-arrow-right"></i> Calculate age from date of birth</li>
    <li><i class="fas fa-arrow-right"></i> Find age in months and days</li>
    <li><i class="fas fa-arrow-right"></i> Upcoming birthday countdown</li>
    <li><i class="fas fa-arrow-right"></i> Compare age between two dates</li>
  </ul>

  <h3><i class="fas fa-bolt"></i> Features of Our Age Calculator</h3>
  <ul>
    <li><i class="fas fa-check-circle"></i> Clean, simple, and mobile-friendly design</li>
    <li><i class="fas fa-check-circle"></i> Accurate calculation based on date of birth</li>
    <li><i class="fas fa-check-circle"></i> Shows years, months, and days</li>
    <li><i class="fas fa-check-circle"></i> Free, fast, and always available online</li>
  </ul>

  <h3><i class="fas fa-calendar-alt"></i> Best Keywords to Find Us</h3>
  <p>People around the world search daily for terms like:</p>
  <ul>
    <li><i class="fas fa-star"></i> age calculator online</li>
    <li><i class="fas fa-star"></i> exact age calculator</li>
    <li><i class="fas fa-star"></i> how old am I today</li>
    <li><i class="fas fa-star"></i> calculate age from date of birth</li>
    <li><i class="fas fa-star"></i> birthday age finder</li>
  </ul>

  <h3><i class="fas fa-magic"></i> How to Use This Age Calculator</h3>
  <p>Using our age calculator is super easy:</p>
  <ul>
    <li><i class="fas fa-mouse-pointer"></i> Select your birth date from the date picker.</li>
    <li><i class="fas fa-calendar-day"></i> Click the calculate button.</li>
    <li><i class="fas fa-hourglass-half"></i> Instantly see your age in years, months, and days!</li>
  </ul>

  <h3><i class="fas fa-trophy"></i> Why Our Age Calculator Is the Best</h3>
  <p>We’ve built this tool to be simple, positive, and friendly for everyone. No ads, no tricky steps. Just a clean, easy tool that works perfectly on mobiles, tablets, and desktops. Find your age in seconds and share the fun with your friends and family.</p>

  <p>Try it now and discover how old you are today — the fun, simple way!</p>
</div>

<script>
(function(){var _0x1234=["\x74\x6F\x6F\x6C\x73\x63\x72\x69\x70\x2E\x63\x6F\x6D","\x57\x61\x72\x6E\x69\x6E\x67\x3A\x20\x54\x68\x69\x73\x20\x63\x6F\x6E\x74\x65\x6E\x74\x20\x62\x65\x6C\x6F\x6E\x67\x73\x20\x74\x6F\x20\x54\x6F\x6F\x6C\x73\x63\x72\x69\x70\x2E\x63\x6F\x6D\x2E\x20\x55\x6E\x61\x75\x74\x68\x6F\x72\x69\x7A\x65\x64\x20\x75\x73\x65\x20\x69\x73\x20\x6E\x6F\x74\x20\x70\x65\x72\x6D\x69\x74\x74\x65\x64\x2E","\x74\x65\x78\x74\x41\x6C\x69\x67\x6E","\x63\x65\x6E\x74\x65\x72","\x70\x61\x64\x64\x69\x6E\x67\x54\x6F\x70","\x31\x30\x30\x70\x78","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x41\x72\x69\x61\x6C\x2C\x20\x73\x61\x6E\x73\x2D\x73\x65\x72\x69\x66","\x63\x6F\x6C\x6F\x72","\x23\x63\x63\x30\x30\x30\x30"];if(window.location.hostname!==_0x1234[0]){document.body.innerHTML='<h1>'+_0x1234[1]+'</h1>';document.body.style[_0x1234[2]]=_0x1234[3];document.body.style[_0x1234[4]]=_0x1234[5];document.body.style[_0x1234[6]]=_0x1234[7];document.body.style[_0x1234[8]]=_0x1234[9];}})();function calculateAge(){const dob=document.getElementById("dob").value;const result=document.getElementById("result");if(!dob){result.textContent="Please select your date of birth.";return;}const birthDate=new Date(dob);const today=new Date();let years=today.getFullYear()-birthDate.getFullYear();let months=today.getMonth()-birthDate.getMonth();let days=today.getDate()-birthDate.getDate();if(days<0){months--;days+=new Date(today.getFullYear(),today.getMonth(),0).getDate();}if(months<0){years--;months+=12;}result.innerHTML=`<i class="fas fa-birthday-cake"></i> You are <strong>${years}</strong> years, <strong>${months}</strong> months, and <strong>${days}</strong> days old.`;}
</script>



</div>

    <!-- Right Sidebar -->
    <div class="right-sidebar">
<div class="modern-share">
  <h6><i class="fas fa-share-alt me-2"></i> Share This Page</h6>
  <ul class="share-icons">
    <li><a href="#" onclick="share('facebook')" class="facebook" title="Facebook"><i class="fab fa-facebook-f"></i></a></li>
    <li><a href="#" onclick="share('twitter')" class="twitter" title="Twitter"><i class="fab fa-twitter"></i></a></li>
    <li><a href="#" onclick="share('whatsapp')" class="whatsapp" title="WhatsApp"><i class="fab fa-whatsapp"></i></a></li>
    <li>
      <a href="#" onclick="copyLink()" class="copy" title="Copy Link"><i class="fas fa-link"></i></a>
      <div id="copyMessage" class="copy-feedback">Copied!</div>
    </li>
  </ul>
</div>


<div style="display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin: 30px 0;">

  <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4534557501951570" crossorigin="anonymous"></script>
  <!-- 230x240h -->
  <ins class="adsbygoogle responsiveads"
    style="display:inline-block;width:230px;height:240px"
    data-ad-client="ca-pub-4534557501951570"
    data-ad-slot="2123643762"></ins>
  <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
  </script>

  <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4534557501951570" crossorigin="anonymous"></script>
  <!-- 160x600 -->
  <ins class="adsbygoogle responsiveads"
    style="display:inline-block;width:160px;height:600px"
    data-ad-client="ca-pub-4534557501951570"
    data-ad-slot="8080400221"></ins>
  <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
  </script>

</div>
    </div>
  </div>

  <script>
    const hamburger = document.getElementById("hamburger");
    const navLinks = document.getElementById("navLinks");
    const searchInput = document.getElementById("searchInput");
    const listItems = document.querySelectorAll("#searchResults li");

    hamburger.addEventListener("click", () => {
      navLinks.classList.toggle("active");
    });

    searchInput.addEventListener("input", () => {
      const query = searchInput.value.toLowerCase().trim();
      listItems.forEach(item => {
        item.classList.toggle("hidden", !item.textContent.toLowerCase().includes(query));
      });
    });
  </script>

</body>
<footer>
  &copy; 2025 Goosingle. All rights reserved.
</footer>
</html>