PageSourceSearch

https://kerneltools.dev/assets/SalaryCalculator-B04dN9cX.js

js kerneltools.dev collected 2026-10-02 01:54:12 UTC 6,976 bytes, 1 lines download raw bytes

1import{r as n,j as e,L as I}from"./index-j7I9Tmll.js";import{c as D}from"./regimeCalculator-CG5Fj9iV.js";import{P as L,f as W}from"./registry-XLiwWW6U.js";import{a as G,C as $,b as w,F as j,T as U,S as _,f as E}from"./ui-BrtddqY1.js";import"./taxEngine-DGwtmO0V.js";import"./hraEngine-hgIj4SaJ.js";/* empty css                    */const i={minBasicPct:50,pfRate:.12,pfWageCeilingMonthly:15e3,gratuityRateOfBasic:15/26/12},l=c=>Math.max(0,Number(c)||0);function q({ay:c,age:F=30,ctc:p,basicPct:R=50,hraPctOfBasic:x=50,pfOn:P="full",gratuityInCtc:f=!0,professionalTax:A=2400,regime:h="auto",rentPaid:T=0,city:g="",section80C:B=0,selfHealthPremium:C=0}){const m=l(p);if(!(m>0))throw new RangeError("Enter your yearly CTC.");const r=[],v=Number(R)||0,u=Math.min(100,Math.max(v,i.minBasicPct));v<i.minBasicPct&&r.push(`Under the wage code, basic + DA must be at least ${i.minBasicPct}% of CTC, so ${i.minBasicPct}% is used.`);const s=m*u/100,d=P==="none"?0:P==="ceiling"?Math.min(s,i.pfWageCeilingMonthly*12):s,N=d*i.pfRate,a=d*i.pfRate,b=f?s*i.gratuityRateOfBasic:0,o=m-N-b,t=Math.min(s*l(x)/100,Math.max(0,o-s)),S=Math.max(0,o-s-t);o<s&&r.push("Employer PF and gratuity take up more than the non-basic part of this CTC, so the split may not match a real payslip.");const y=Math.min(l(A),L),H=D({ay:c,age:F,grossSalary:o,basicPlusDa:s,hra:l(T)>0?{hraReceived:t,rentPaid:l(T),city:g}:null,professionalTax:y,section80C:a+l(B),selfHealthPremium:l(C)}),k=h==="auto"?H.recommended:h,M=H[`${k}Regime`].totalTax,O=o-a-y-M;return{regime:k,comparison:H,warnings:r,basicPct:u,ctc:m,basic:s,hra:t,specialAllowance:S,employerPf:N,gratuity:b,gross:o,employeePf:a,professionalTax:y,incomeTax:M,inHand:O,monthly:{gross:o/12,employeePf:a/12,professionalTax:y/12,incomeTax:M/12,inHand:O/12}}}const Y=["2027-28","2026-27"],K=["Mumbai","Delhi","Chennai","Kolkata","Bengaluru","Hyderabad","Pune","Ahmedabad","Other"];function ae(){const[c,F]=n.useState(Y[0]),[p,R]=n.useState("1200000"),[x,P]=n.useState("50"),[f,A]=n.useState("50"),[h,T]=n.useState("full"),[g,B]=n.useState("yes"),[C,m]=n.useState("2400"),[r,v]=n.useState("0"),[u,s]=n.useState("Bengaluru"),[d,N]=n.useState("auto"),{result:a,error:b}=n.useMemo(()=>G(()=>q({ay:c,ctc:Number(p),basicPct:Number(x),hraPctOfBasic:Number(f),pfOn:h,gratuityInCtc:g==="yes",professionalTax:Number(C),rentPaid:Number(r)*12,city:u,regime:d})),[c,p,x,f,h,g,C,r,u,d]),o=a&&[["Cost to company (CTC)",a.ctc,!0],["− Employer PF (goes to your PF account)",-a.employerPf],["− Gratuity (paid when you leave)",-a.gratuity],["= Gross salary",a.gross,!0],["   Basic + DA",a.basic],["   HRA",a.hra],["   Special allowance",a.specialAllowance],["− Your PF contribution",-a.employeePf],["− Professional tax",-a.professionalTax],[`− Income tax (${a.regime} regime)`,-a.incomeTax],["= In-hand salary",a.inHand,!0]];return e.jsxs($,{slug:"salary-calculator",children:[e.jsxs("div",{className:"calc-layout",children:[e.jsxs("section",{className:"calc-inputs","aria-label":"Salary structure",children:[e.jsx(w,{label:"Financial year",value:c,onChange:F,options:Y.map(t=>[t,`FY ${W(t)}`])}),e.jsx(j,{label:"CTC per year",prefix:"₹",value:p,onChange:R,min:1e5,max:1e7,step:5e4}),e.jsx(j,{label:"Basic + DA",suffix:"% of CTC",value:x,onChange:P,min:50,max:80,hint:"The wage code (from Nov 2025) requires at least 50% of CTC."}),e.jsx(j,{label:"HRA",suffix:"% of basic",value:f,onChange:A,min:0,max:50,slider:!1,hint:"Usually 50% in metro cities, 40% elsewhere."}),e.jsx(w,{label:"PF calculated on",value:h,onChange:T,options:[["full","Full basic"],["ceiling","₹15,000 ceiling"],["none","No PF"]]}),e.jsx(w,{label:"Gratuity included in CTC?",value:g,onChange:B,options:[["yes","Yes"],["no","No"]]}),e.jsx(j,{label:"Professional tax per year",prefix:"₹",value:C,onChange:m,min:0,max:2500,slider:!1,hint:"Set by your state; up to ₹2,500 a year. Some states have none."}),e.jsx(j,{label:"Rent you pay per month",prefix:"₹",value:r,onChange:v,min:0,max:3e5,step:1e3,slider:!1,hint:"For the HRA exemption, which only counts in the old regime."}),Number(r)>0&&e.jsxs("div",{className:"calc-field",children:[e.jsx("label",{htmlFor:"calc-salary-city",children:"City"}),e.jsx("select",{id:"calc-salary-city",className:"calc-select",value:u,onChange:t=>s(t.target.value),children:K.map(t=>e.jsx("option",{children:t},t))})]}),e.jsx(w,{label:"Tax regime",value:d,onChange:N,options:[["auto","Whichever is lower"],["new","New"],["old","Old"]]})]}),e.jsx("section",{className:"calc-results","aria-live":"polite",children:b?e.jsx("p",{className:"calc-error",children:b}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"calc-result-heading",children:[e.jsx("span",{children:"CTC to take-home"}),e.jsxs("strong",{children:[Math.round(a.inHand/a.ctc*100),"% of CTC reaches your account"]})]}),e.jsx(U,{items:[["In-hand per month",a.monthly.inHand,!0],["In-hand per year",a.inHand],["Income tax per month",a.monthly.incomeTax]]}),a.warnings.map(t=>e.jsx("p",{className:"calc-note",children:t}
1,t)),e.jsx(_,{label:"Where your CTC goes each year",parts:[["In-hand",a.inHand,"b"],["Income tax",a.incomeTax,"e"],["PF (yours + employer)",a.employeePf+a.employerPf,"a"],["Gratuity",a.gratuity,"c"],["Professional tax",a.professionalTax,"d"]]}),e.jsxs("p",{className:"calc-note",children:["Your PF (",E(a.employeePf+a.employerPf)," a year including the employer's share) and gratuity are still yours: they're savings you get later, not money lost."]})]})})]}),a&&e.jsxs("section",{className:"calc-schedule",children:[e.jsx("h2",{children:"From CTC to in-hand"}),e.jsx("div",{className:"calc-table-wrap",children:e.jsxs("table",{className:"calc-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Component"}),e.jsx("th",{children:"Per year"}),e.jsx("th",{children:"Per month"})]})}),e.jsx("tbody",{children:o.map(([t,S,y])=>e.jsxs("tr",{children:[e.jsx("td",{children:y?e.jsx("strong",{children:t}):t}),e.jsx("td",{children:E(Math.abs(S))}),e.jsx("td",{children:E(Math.abs(S)/12)})]},t))})]})})]}),e.jsxs("section",{className:"calc-info",children:[e.jsx("h2",{children:"How CTC becomes take-home pay"}),e.jsx("p",{children:"Your CTC includes things you don't receive every month: the employer's 12% PF contribution and gratuity (about 4.81% of basic). What's left is your gross salary. From that, your own 12% PF, professional tax and income tax (TDS) are deducted; the rest is paid into your account."}),e.jsxs("p",{children:["Since the wage code took effect in November 2025, basic pay must be at least half of CTC. A higher basic means more PF and gratuity, so slightly lower monthly take-home but more savings. Compare regimes in detail with the ",e.jsx(I,{to:"/old-vs-new-tax-regime-calculator",children:"tax regime calculator"}),", check your ",e.jsx(I,{to:"/hra-calculator",children:"HRA exemption"}),", or plan ",e.jsx(I,{to:"/advance-tax-calculator",children:"advance tax"})," if you have other income."]})]})]})}export{ae as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.