Penal Code

Section 22: When imprisonment starts and deduction of pre-trial detention

Statutory text (Thai original)

โทษจำคุก ให้เริ่มแต่วันมีคำพิพากษา แต่ถ้าผู้ต้องคำพิพากษาถูกคุมขังก่อนศาลพิพากษา ให้หักจำนวนวันที่ถูกคุมขังออกจากระยะเวลาจำคุกตามคำพิพากษา เว้นแต่คำพิพากษานั้นจะกล่าวไว้เป็นอย่างอื่น ในกรณีที่คำพิพากษากล่าวไว้เป็นอย่างอื่น โทษจำคุกตามคำพิพากษาเมื่อรวมจำนวนวันที่ถูกคุมขังก่อนศาลพิพากษาในคดีเรื่องนั้นเข้าด้วยแล้ว ต้องไม่เกินอัตราโทษขั้นสูงของกฎหมายที่กำหนดไว้สำหรับความผิดที่ได้กระทำลงนั้น ทั้งนี้ ไม่เป็นการกระทบกระเทือนบทบัญญัติในมาตรา ๙๑

English translation

A term of imprisonment shall commence from the day of the judgment. But if the person subject to the judgment was detained before the court gave judgment, the number of days of that detention shall be deducted from the term of imprisonment under the judgment, unless the judgment provides otherwise.
Where the judgment provides otherwise, the term of imprisonment under the judgment, when added to the number of days of detention before judgment in that case, must not exceed the maximum penalty prescribed by law for the offence committed.
This Section does not affect the provisions of Section 91.

ThaiLawOnline translation, written from the Thai original and verified

Firm annotation

Section 22 fixes when a prison term begins and requires credit for pre-judgment detention, a core fairness rule so that time already spent in custody counts toward the sentence. The Supreme Court reads 'detained before judgment' narrowly: only custody in the very case being decided may be credited, not days spent detained in a separate case. The provision also underlies consecutive sentencing (counting one term after another) at the court's discretion, subject to the logical limit that where another case ended in a death sentence there is no imprisonment term to run consecutively. The second paragraph caps the combined figure so that credited detention plus the sentence never exceeds the offense's statutory maximum.

Why this matters in practice

This is money in the bank for anyone held before trial: every day in pre-judgment custody in the same case must be credited against the final sentence, so it is worth confirming the judgment actually orders the deduction. Note the limit, days spent in custody on a different case do not count, and consecutive sentencing across cases can extend total time served. If you have been held in custody awaiting trial, check that the deduction is correctly reflected; our note on what to know before you go to court in Thailand gives useful background.

Supreme Court decisions interpreting this section

  1. Supreme Court Judgment No. 108/2566 (2023)

    Under Section 22 paragraph one, detention 'before judgment' means custody in the very case being decided; days spent detained in another case cannot be deducted from the imprisonment in this case.

    The defendant argued he should be credited with all 588 days held before judgment across three cases heard together. The Court explained that Section 22 paragraph one credits only detention in the case in which judgment is given; 'detained before judgment' means detained in that case, so days detained in other cases cannot be deducted from the term in this one.

  2. Supreme Court Judgment No. 1518/2565 (2022)

    Section 22 paragraph one lets a court order sentences to run consecutively, but where another case ended in a death sentence there is no imprisonment term for the present sentence to run after, so consecutive counting is impossible.

    The Court held that where the present case imposes imprisonment, a court may in its discretion order it to run consecutively with imprisonment in another case under Section 22 paragraph one. But in the other case the Supreme Court had imposed the death penalty, so there was no imprisonment term to run consecutively, and by their nature a death sentence and a prison term cannot be counted consecutively.

  3. Supreme Court Judgment No. 4884/2566 (2023)

    Where confinement is substituted for imprisonment, the court may under Section 22 order the confinement terms to run consecutively with those in other cases, even though the cases are not yet final.

    The defendant's imprisonment across four cases was changed to confinement. Because confinement is imposed in place of imprisonment, the defendant remains bound by the judgments, and the fact that the cases were still on appeal was no bar to counting the confinement consecutively. The Court upheld the order to count the confinement in this case after the confinement in the others under Section 22.

Curated decisions with case numbers verified against the Supreme Court database. English renderings are the firm's editorial translation for study.

Cited in 55 Supreme Court decisions (1957 to 2023)

Selected citing decisions

  • Decision 4884/2566 (2023)
  • Decision 1518/2565 (2022)
  • Decision 3676/2564 (2021)
  • Decision 2469/2560 (2017)
  • Decision 5548/2559 (2016)
  • Decision 1831/2557 (2014)
  • Decision 336/2557 (2014)
  • Decision 6581-6582/2556 (2013)

This list is selected automatically, weighted towards judgments that turn on this section rather than ones that merely recite it when passing sentence. It has not yet been reviewed by the firm.

Most often cited alongside

Sections that appear in the same judgments as this one most often. The figure is the number of decisions.

Counted across the firm's corpus of 83,652 Supreme Court decisions, 1921 to 2026. The count is complete; the stated year range trims rare outliers so it describes where the citations actually sit. These figures are computed by us and are not official court statistics. How we count these, and what we measured

Frequently asked questions

Is time in custody before trial deducted from the sentence?

Yes. Under Section 22, days spent in detention before judgment in the same case are deducted from the term of imprisonment, unless the judgment provides otherwise.

Can detention in another case be deducted?

No. The Supreme Court has held that only detention in the very case being decided may be credited; days detained in a separate case cannot be deducted.

Related guides on ThaiLawOnline

Cite this section

  • Plain citation Penal Code, s. 22 (Thailand)
  • Academic citation Penal Code (Thailand), s. 22. ThaiLawOnline, https://www.thailawonline.com/thai-penal-code/section-22/ (accessed 17 August 2026).
  • Thai citation ป.อ. มาตรา 22
  • Permalink https://www.thailawonline.com/thai-penal-code/section-22/
  • Embed on your site <blockquote cite="https://www.thailawonline.com/thai-penal-code/section-22/"><p>A term of imprisonment shall commence from the day of the judgment. But if the person subject to the judgment was detained before the court gave judgment, the number of days of that detention shall be deducted from the term of imprisonment under the judgment,…</p><footer>Penal Code, s. 22 (Thailand) — <a href="https://www.thailawonline.com/thai-penal-code/section-22/">ThaiLawOnline</a></footer></blockquote>

The Thai text is authoritative. The English is an unofficial translation by ThaiLawOnline, free to reuse with attribution.

This is educational reference, not legal advice. Consult a qualified Thai lawyer before relying on any provision.

Scroll to Top
WhatsApp LINE Call Book