/v1/calculations/panchanga
Complete Panchanga calculation with Tithi, Nakshatra, Yoga, Karana, planetary positions, and auspicious timings. Scientifically validated against DrikPanchang.
What is Panchanga?
Panchanga (पञ्चाङ्ग) is the traditional Vedic calendar system consisting of five essential elements that determine auspicious timings for various activities. Each Panchanga element carries specific astrological significance and influences the quality of time.
तिथि (Tithi)
The lunar day, calculated from the Moon's position relative to the Sun. There are 30 Tithis in a lunar month.
नक्षत्र (Nakshatra)
The lunar mansion or constellation the Moon is currently in. There are 27 Nakshatras covering the zodiac.
योग (Yoga)
The combination of Sun and Moon positions, creating 27 different Yogas with varying auspiciousness.
करण (Karana)
Half of a Tithi, creating 11 Karanas that influence the quality of time periods.
वार (Weekday)
The seven days of the week, each ruled by different planets with specific characteristics.
Parameters
Complete Response Example
{
"tithi": {
"name": "Dashami",
"number": 10,
"paksha": "Shukla Paksha",
"endTime": "2026-02-27T00:48:00.000Z",
"quality": "Benefic",
"activities": ["Marriage", "House warming", "Business deals"]
},
"nakshatra": {
"name": "Mrigashira",
"number": 5,
"lord": "Mars",
"startTime": "2026-02-26T12:00:00.000Z",
"endTime": "2026-02-27T02:30:00.000Z",
"quality": "Mixed",
"direction": "South",
"symbol": "Deer head",
"deity": "Soma"
},
"yoga": {
"name": "Priti",
"number": 3,
"endTime": "2026-02-26T22:48:00.000Z",
"quality": "Benefic",
"description": "Yoga of love and affection"
},
"karana": {
"name": "Taitila",
"number": 8,
"quality": "Benefic"
},
"times": {
"sunrise": "06:31",
"sunset": "18:02",
"dinamana": 41100000,
"rahuKaal": {
"start": "10:30",
"end": "12:00",
"duration": "1.5 hours"
}
},
"planetaryPositions": {
"sun": { "longitude": 318.5, "rashi": "Aquarius" },
"moon": { "longitude": 53.2, "rashi": "Taurus" }
},
"panchaka": {
"name": "Raja Panchaka",
"isAuspicious": false,
"description": "Royal Panchaka - avoid auspicious activities",
"severity": "high"
},
"anandadiYoga": {
"yogaName": "Priti",
"isAuspicious": true,
"weekday": 3,
"nakshatra": 4
},
"nivasShool": {
"direction": "South",
"isAuspicious": false,
"description": "Southern direction is inauspicious today",
"recommendation": "Avoid traveling south or facing south"
},
"varjyam": {
"isVarjyam": true,
"startTime": "2026-02-26T14:30:00Z",
"endTime": "2026-02-26T16:00:00Z",
"duration": 5400000,
"nakshatra": "Mrigashira"
},
"muhurtaGrid": [
{
"time": "06:00-07:30",
"quality": "Benefic",
"activities": ["Prayer", "Study", "Morning routines"]
}
],
"validation": {
"source": "DrikPanchang",
"url": "https://www.drikpanchang.com/panchang/day-panchang.html?geoname-id=1283240",
"accuracy": "100%",
"lastValidated": "2026-02-26"
}
}
Phase 2 Advanced Features
पंचक (Panchaka)
Traditional Panchaka Rahita calculations determining auspicious and inauspicious periods for ceremonies.
आनंदादि योग (Anandadi Yoga)
Combination of weekday and Nakshatra energies creating 10 different yoga types.
निवास शूल (Nivas Shool)
Directional auspiciousness indicating which directions should be avoided on specific days.
वर्ज्यम (Varjyam)
Inauspicious time periods during certain Nakshatras that should be avoided for important activities.
Integration Examples
// Get today's Panchanga for Kathmandu
const response = await fetch('/v1/calculations/panchanga?' + new URLSearchParams({
date: new Date().toISOString(),
latitude: 27.7172,
longitude: 85.3240,
timezone: 5.75
}), {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const panchanga = await response.json();
console.log(\`Today is \${panchanga.tithi.name} Tithi in \${panchanga.tithi.paksha}\`);
console.log(\`Moon is in \${panchanga.nakshatra.name} Nakshatra\`);
console.log(\`Current Yoga: \${panchanga.yoga.name}\`);
// Check auspicious timing
if (panchanga.panchaka.isAuspicious) {
console.log('Good day for auspicious activities');
} else {
console.log(\`Avoid: \${panchanga.panchaka.description}\`);
}
import requests
from datetime import datetime
# Calculate Panchanga
params = {
'date': datetime.now().isoformat(),
'latitude': 27.7172, # Kathmandu
'longitude': 85.3240,
'timezone': 5.75
}
headers = {'Authorization': 'Bearer YOUR_API_KEY'}
response = requests.get('https://api.astro-fusion.com/v1/calculations/panchanga',
params=params, headers=headers)
panchanga = response.json()
# Display key information
print(f"Tithi: {panchanga['tithi']['name']} ({panchanga['tithi']['paksha']})")
print(f"Nakshatra: {panchanga['nakshatra']['name']} (Lord: {panchanga['nakshatra']['lord']})")
print(f"Sunrise: {panchanga['times']['sunrise']}, Sunset: {panchanga['times']['sunset']}")
# Check for auspicious activities
if panchanga['panchaka']['isAuspicious']:
print("✅ Good day for ceremonies and auspicious activities")
else:
print(f"⚠️ {panchanga['panchaka']['description']}")
# Check Varjyam
if panchanga['varjyam']['isVarjyam']:
print(f"🛑 Varjyam period: {panchanga['varjyam']['startTime']} to {panchanga['varjyam']['endTime']}")
else:
print("✅ No Varjyam today - good for all activities")
<?php
// Panchanga calculation for festival planning
$apiKey = 'YOUR_API_KEY';
$date = date('c'); // Current date in ISO format
$url = "https://api.astro-fusion.com/v1/calculations/panchanga?" . http_build_query([
'date' => $date,
'latitude' => 27.7172, // Kathmandu
'longitude' => 85.3240,
'timezone' => 5.75
]);
$context = stream_context_create([
'http' => [
'header' => "Authorization: Bearer $apiKey\r\n" .
"Content-Type: application/json\r\n"
]
]);
$response = file_get_contents($url, false, $context);
$panchanga = json_decode($response, true);
// Check if today is good for marriage
$tithiGoodForMarriage = in_array('Marriage', $panchanga['tithi']['activities']);
$panchakaGood = $panchanga['panchaka']['isAuspicious'];
$varjyamPresent = $panchanga['varjyam']['isVarjyam'];
if ($tithiGoodForMarriage && $panchakaGood && !$varjyamPresent) {
echo "✅ Excellent day for marriage ceremony\\n";
echo "Tithi: {$panchanga['tithi']['name']}\\n";
echo "Nakshatra: {$panchanga['nakshatra']['name']}\\n";
} else {
echo "⚠️ Not ideal for marriage today\\n";
if (!$panchanga['panchaka']['isAuspicious']) {
echo "Reason: {$panchanga['panchaka']['description']}\\n";
}
}
?>
Common Use Cases
🗓️ Daily Calendar Apps
Display traditional Panchanga information alongside modern calendars
🕉️ Temple & Ceremony Planning
Find auspicious timings for religious ceremonies and rituals
💼 Business Decision Making
Check Panchanga before important business deals and launches
🏠 Wedding Planners
Find perfect wedding dates based on traditional astrological timing
🌾 Agricultural Planning
Traditional farming communities use Panchanga for sowing and harvesting
📅 Festival Calendars
Create accurate festival calendars with traditional timing information