Horizontal Alignment – How to Left Align Text and Align Equal Signs

alignalignmenthorizontal alignment

How do I left align the text and align these equal signs? As for the equal sign I used \, and it kind of works but I want to be more close. Is there a smaller spacing than this or any way to better align these equal signs?

enter image description here

The expected output is something like this.

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}

Input data \,\, =  2000\\
Deleted data \,\,\,\,\,\,\,\,= 500\\
Remaining data = 2000 - 500 =1500   


\end{document}

Sorry that I probably should have mentioned that I'm going to put the text inside a table like this.
The solution @Mico gave works but not in this table. So I think the table change the formating somehow.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\begin{document}

\begin{table}[]
\centering
\caption{This is a table}
\label{tab: this is a table} 
\begin{tabular}{cc} \\ \toprule
\textbf{No}      & \textbf{Example}  \\ \midrule
1         & 9                         \\
2         & 5                      \\
3         & 3                      \\ \midrule
\multicolumn{2}{l}{\begin{tabular}[c]{@{}l@{}}
\[
\setlength\arraycolsep{0pt}
\begin{array}{ L @{{}={}} l }
\text{Input data}     &  2000 \\
\text{Deleted data}   &  500  \\
\text{Remaining data}  &  2000-500=1500
\end{array}
\]
\end{tabular}} \\ \bottomrule
\end{tabular}
\end{table}

\end{document}

Best Answer

Here's a different array-based solution.

enter image description here

\documentclass{article}
\usepackage{array} % for \newcolumntype macro
\newcolumntype{L}{>{$}l<{$}}

\begin{document}
\[
\setlength\arraycolsep{0pt}
\begin{array}{ L @{{}={}} l }
Input data     &  2000 \\
Deleted data   &  500  \\
Remaning data  &  2000-500=1500
\end{array}
\]
\end{document}

Addendum: Here's how I would modify the OP's addtional example code to embed the array inside a two-column tabular environment:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{booktabs,amsmath,array}
\newcolumntype{L}{>{$}l<{$}}

\begin{document}

\begin{table}[h]
\centering
\caption{This is a table\strut}
\label{tab:this is a table} 
\begin{tabular}{@{} cc @{}} 
\toprule
\textbf{No} & \textbf{Example} \\ 
\midrule
1  & 9  \\
2  & 5  \\
3  & 3  \\ 
\midrule
\multicolumn{2}{@{}c@{}}{%
   \setlength\arraycolsep{0pt}$
   \begin{array}{ L @{{}={}} l }
   Input data     &  2000 \\
   Deleted data   &  500  \\
   Remaining data &  2000-500=1500
   \end{array}$
} \\ 
\bottomrule
\end{tabular}
\end{table}

\end{document}