Two ways.
The last argument of \titleformat can contain a macro that takes the title as its argument. So
\usepackage{titlesec} \titleformat{\section}[runin] {\normalfont\Large\bfseries} {\thesection} {1em} {\addperiod} \titleformat{\subsection}[runin] {\normalfont\large\bfseries} {\thesubsection} {1em} {\addperiod} \newcommand{\addperiod}[1]{#1.}
Alternatively, use the explicit option; in this case you have to use #1 in the last argument to \titleformat to stand for the title.
\usepackage[explicit]{titlesec} \titleformat{\section}[runin] {\normalfont\Large\bfseries} {\thesection} {1em} {#1.} \titleformat{\subsection}[runin] {\normalfont\large\bfseries} {\thesubsection} {1em} {#1.}
The first way is more customizable.
titlesecdocumentation using two different approaches. See section 4.4. Putting a Dot after the Section Title (p 12) with\periodafterand a similar approach using theexplicitpackage option (section 3.7. Other Package Options, p 8).