@Ronflaix Gramatically, it's correct. there's no "to be" verb in Japanese, but don't worry. There's similar format. You can use "(subjective)は(complement)です" to express the two examples you gave.
For example, "私(I)は21歳(21 years old)です"
But this is the most simple example. You might have to use another format depending on the situations.