How it works · packages/law

How Section 479 is computed.

The engine is one pure function, evaluate(input, today). It never reads the papers and never calls a model. Every date and number on this page was computed by that function when the page was built, as of 15 Nov 2026.

The rule in one paragraph

An undertrial held for an offence not punishable with death or life imprisonment is to be released on bail once detained for half the maximum term for that offence, or one-third if they have never been convicted of any offence (the first proviso to 479(1)). No one may be held for longer than the maximum term itself (second proviso). Days of delay caused by the accused are not counted (Explanation). The jail superintendent must apply to the court when the line is crossed (479(3)). Where an investigation, inquiry or trial in more than one offence or in multiple cases is pending, the court shall not release the person under 479(1) (479(2)). Plain-language summary: /law.

The order of the steps

StepWhat the engine doesTrace label
1Splits compound references (379/411, 3/25, 302 r/w 34), reads each section in a canonical form (Devanagari digits and letters, hyphens, sub-clauses), and looks it up in the tables.section
2Decides the provision: Section 479, with the pre-July-2024 note where it applies.provision
3If any section allows death or life: outside 479. Stops here.excluded
4Finds the maximum term: the longest among the charged sections, or a maximum a lawyer entered. Anything unknown is listed as missing.max_term
5Needs a custody start date on or before today. Without it, or with any missing fact: can't tell. Stops here.missing
6Picks the fraction, adds it to the custody date, and adds any accused delay.fraction · custody · delay · line
7Compares with today. Not yet: days to go. Past: days past, then the flags.today · flag · result

Fractions and rounding

Terms are held in whole months. The line is the custody date plus one-half or one-third of the maximum, done on the calendar, not by counting 30-day months (addFractionOfMonths in packages/law/src/dates.ts):

  • Whole months are added with month arithmetic: 12 March plus 18 months is 12 September. A month end lands on the last day of a shorter month.
  • A leftover part-month becomes days of the month that follows, rounded up. So the line can only move later, never earlier, and the engine never calls someone past the line a day early.

Example, computed by the engine

Obstructing public servant in discharge of public functions (IPC 186) has a maximum of 3 months; half is 1.5 months. From custody on 31 Jan 2024, one whole month lands on the last day of February, and the half-month left over becomes days of the next month, rounded up. Line: 15 Mar 2024.

First-time status unknown

The one-third line applies only when the papers say the person has no previous conviction or criminal history. When they say nothing, the engine uses the half line, which is the safe one, and also returns the one-third date as firstTimeLineDate, shown on screen as “if first-time is confirmed”. If today is already past that earlier line, a NOT_YET result carries a flag saying so, and the docket agent may request a criminal-history report.

In the worked example below, if the papers had said nothing about S01's history, the line would be 14 Sep 2024 (half) instead of 14 Mar 2024, with 14 Mar 2024 shown as the line if first-time status is confirmed.

Delay caused by the accused

The papers rarely state this, so the model is never asked for it. A person enters it on the case page (or as accusedDelayDays in the API, accused_delay_days in MCP). The engine subtracts those days from the days detained and pushes every line date back by the same number of days. It can only make the line later.

S01 with 45 days of accused delay: line 28 Apr 2024 instead of 14 Mar 2024; 1297 days counted as detained instead of 1342.

Cases registered before July 2024

The BNSS came into force on 1 Jul 2024. The old law, Section 436A of the CrPC, set only the half line, with no one-third benefit. By its order of 23 Aug 2024 in W.P.(C) 406/2013, the Supreme Court directed that Section 479 applies to undertrials in cases registered before that date too. So the engine applies Section 479 to every case, and for older cases it also returns the old 436A date (oldLawLineDate, the half line) for comparison.

A case counts as older when its registration date is before 1 Jul 2024. When the registration date is not known, a charge under the IPC (which the BNSS replaced) is taken as a sign of an older case. The provision is returned as BNSS_479_PRE_JULY_2024 or BNSS_479.

The 479(2) flag and other flags

Past the line becomes past the line · flagged when any of these hold:

  • More than one offence is charged. Sections that are not offences on their own (common intention, definitions, prohibitions read with a penal section, aggravations) are not counted.
  • The papers say other cases are pending.
  • The papers don't say whether other cases are pending.

A lawyer decides how 479(2) applies before anything is filed; the draft carries a note saying so. Two more flags are added where they apply: detention has reached the full maximum term (the second proviso bars any further detention), and a charged section has been struck down and cannot found a charge.

Exclusions and can't tell

Outside 479. One section that allows death or life imprisonment takes the whole case outside Section 479, whatever else is charged. For example IPC 379 with IPC 307: EXCLUDED. This check runs before anything else, so it holds even when the custody date is missing.

Can't tell. The engine refuses to guess. It returns CANT_TELL with a list of what is missing when there is no valid custody date (or one in the future); when a section is not in the tables; when the maximum depends on details the section number doesn't give (state excise laws, the UP Gangsters Act, some limbs of special acts); and for NDPS offences when the quantity class isn't in the papers. NDPS s.20 with no quantity: CANT_TELL, missing “Maximum term for NDPS Act 1985 s.20”. With a quantity class the term is known: small 1 year, intermediate 10 years, commercial 20 years.

A lawyer can enter the maximum by hand (maxTermOverrideMonths); the trace then says the maximum was entered by the reviewing lawyer.

The statute tables

Table rows
347
IPC, BNS and special acts
IPC sections
137
BNS sections
142
IPC→BNS mappings
137

The tables live in packages/law/src/tables/. Each row is a section, its title and its maximum, and each carries a source citation (for example IPC 1860 s.379) that the trace prints next to the step that used it. The maximum is the longest imprisonment the section allows across its sub-clauses. Rows are written from the bare acts; they should be reviewed by counsel before use in a real jail.

ActRows
Indian Penal Code, 1860137
Bharatiya Nyaya Sanhita, 2023142
Narcotic Drugs and Psychotropic Substances Act, 19859
Arms Act, 195922
Protection of Children from Sexual Offences Act, 201212
Scheduled Castes and the Scheduled Tribes (Prevention of Atrocities) Act, 19896
Dowry Prohibition Act, 19612
Public Gambling Act, 18673
Information Technology Act, 20008
State Excise Acts3
Uttar Pradesh Gangsters and Anti-Social Activities (Prevention) Act, 19863

Not every row is a fixed term. The kind of punishment decides how the engine treats it:

KindRowsMeaningEngine
term223A fixed maximum termUsed for the line
life / death68Allows life imprisonment or deathOutside 479
modifier21Not an offence on its own (common intention, definitions, prohibitions)Ignored for the term and the 479(2) count
derivative9Punished as the main offence (conspiracy, abetment)Needs the main offence
companion7Raises or lowers the main offence's term (attempt, aggravation)Main offence's full term: later, safer
detail11Term depends on a fact the section number doesn't giveCan't tell, or a lawyer enters it
quantity6NDPS: term depends on the quantity classTerm from the class, or can't tell
struck2Struck down by a constitutional courtFlagged

A sub-clause that is not in the tables is read under its parent section (376(2)(n) → 376(2) → 376). A bare BNS section with several limbs is read as the limb with the longest term. Arms Act s.25 read with s.3, 4 or 5 is narrowed to the matching limb. The IPC→BNS map marks each mapping one-to-one, split, merged or dropped. Look any section up with the MCP tool lookup_section.

Worked example: S01

S01 is a constructed Hindi bail order from the sample tray (not a real case; names masked): theft of a motorcycle and receiving it. The facts below are the ones the verifier accepted from Claude's reading; the engine did the rest.

FactValueQuote from the order
Charged sectionIPC 379अन्तर्गत धारा 379, 411 भा.द.वि.
Charged sectionIPC 411अन्तर्गत धारा 379, 411 भा.द.वि.
Custody began2023-03-14प्रार्थी/अभियुक्त दिनांक 14.03.2023 से जिला कारागार आगरा में निरुद्ध है।
First-time offendertrueप्रार्थी/अभियुक्त का कोई आपराधिक इतिहास नहीं है।
Other cases pendingfalseप्रार्थी/अभियुक्त का कोई आपराधिक इतिहास नहीं है।
Case registered2023-03-12इस संबंध में दिनांक 12.03.2023 को थाना सुजानपुर पर प्रथम सूचना रिपोर्ट पंजीकृत की गई।
Maximum term
3 years
longest among the charges
Fraction
1/3
first-time, per the papers
Line date
14 Mar 2024
Days past the line
976
as of 15 Nov 2026
S01: custody, the lines and todayCustody began 14 Mar 2023. The one-third line is 14 Mar 2024. The half line, which is also the old Section 436A date, is 14 Sep 2024. The full maximum term ended 14 Mar 2026. Today is 15 Nov 2026.Custody began2023-03-14One-third line2024-03-14Half line (old 436A)2024-09-14Full maximum2026-03-14Today2026-11-15
Scroll sideways to see the whole diagram. S01 on one axis. Every date is computed by the engine as of 15 Nov 2026.

The rule trace, as the engine wrote it

  1. 01IPC 1860 s.379 (Punishment for theft) → max 3 yearsIPC 1860 s.379
  2. 02IPC 1860 s.411 (Dishonestly receiving stolen property) → max 3 yearsIPC 1860 s.411
  3. 03Case from before 1 Jul 2024: Sec 479 BNSS still applies, per the Supreme Court order of 23 Aug 2024. Old Sec 436A CrPC (half line, no first-time benefit) shown for comparison.SC order, W.P.(C) 406/2013, 23 Aug 2024
  4. 04Longest maximum among the charges: 3 years (IPC 1860 s.379).IPC 1860 s.379
  5. 05First-time offender (per the papers): one-third of 3 years.BNSS 2023 s.479(1) and first proviso
  6. 06Custody began 14 Mar 2023.
  7. 07Line: 14 Mar 2024.
  8. 08Today: 15 Nov 2026; 1342 days detained.
  9. 09Detention has reached the full maximum term.BNSS 2023 s.479(1), second proviso
  10. 10Sec 479(2): More than one offence is charged (IPC 1860 s.379, IPC 1860 s.411).BNSS 2023 s.479(2)
  11. 11PAST THE LINE by 976 days, FLAGGED under Sec 479(2): a lawyer decides how 479(2) applies before the application.

Result: PAST_FLAGGED, 976 days past the line as of 15 Nov 2026. The engine raised 2 flags for the lawyer:

  • Detained for the full maximum term or longer: Sec 479(1) second proviso bars any further detention.
  • More than one offence is charged (IPC 1860 s.379, IPC 1860 s.411).

Open the case at /case/S01 to see the quotes marked in the order and to change any fact.